diff --git a/bin/game/Command.class b/bin/game/Command.class index 3c88771..5dd74be 100644 Binary files a/bin/game/Command.class and b/bin/game/Command.class differ diff --git a/bin/game/Joueur.class b/bin/game/Joueur.class index b37a273..2f37e86 100644 Binary files a/bin/game/Joueur.class and b/bin/game/Joueur.class differ diff --git a/bin/game/Match.class b/bin/game/Match.class index e79f9be..3366620 100644 Binary files a/bin/game/Match.class and b/bin/game/Match.class differ diff --git a/src/game/Command.java b/src/game/Command.java index 8685eac..b62f96c 100644 --- a/src/game/Command.java +++ b/src/game/Command.java @@ -28,4 +28,8 @@ public final class Command { public static final String BATTLE = "battlephase"; public static final String SET_ENEMY_HP = "setenemhp"; public static final String SET_HP = "sethp"; + public static final String SET_CARD_HP = "setcardhp"; + public static final String SET_ADV_CARD_HP = "setadvcardhp"; + + } diff --git a/src/game/Joueur.java b/src/game/Joueur.java index b4de8e6..024045e 100644 --- a/src/game/Joueur.java +++ b/src/game/Joueur.java @@ -374,6 +374,14 @@ public class Joueur { // appelle les effet de quand la carte est détruite // NOTE : non implémenter dans les cartes individuelles par manque de temps attackedCard.onCardDestroyed(); + }else { + adversaire.getComs().send(Command.SET_CARD_HP); + adversaire.getComs().send(carteCible); + adversaire.getComs().send(attackedCard.getHealth()); + + this.getComs().send(Command.SET_ADV_CARD_HP); + this.getComs().send(carteCible); + this.getComs().send(attackedCard.getHealth()); } } diff --git a/src/game/Match.java b/src/game/Match.java index d89385c..69a48e7 100644 --- a/src/game/Match.java +++ b/src/game/Match.java @@ -22,7 +22,7 @@ public class Match extends Thread { joueur1.requestDataEarlyGameData(); joueur2.requestDataEarlyGameData(); Thread connect = new Thread(); - connect.run(); + connect.start(); System.out.println("ready"); start(); }