diff --git a/src/main/java/model/card/MonsterCard.java b/src/main/java/model/card/MonsterCard.java index a4cfa16b..a1a35048 100644 --- a/src/main/java/model/card/MonsterCard.java +++ b/src/main/java/model/card/MonsterCard.java @@ -129,6 +129,7 @@ public void changePosition() { this.position = PositionMonsters.ATTACK; } else { this.position = PositionMonsters.DEFENSE; + this.defenceMode = DefensePosition.DO; } } diff --git a/src/main/java/model/game/Game.java b/src/main/java/model/game/Game.java index 75e4c46a..5d8ff44a 100644 --- a/src/main/java/model/game/Game.java +++ b/src/main/java/model/game/Game.java @@ -440,7 +440,7 @@ public int attackToOpponentCardInAttackPosition(MonsterCard playerCard, MonsterC public int attackToOpponentCardInDefensePosition(MonsterCard playerCard, MonsterCard opponentCard, GameBoard playerGameBoard, GameBoard opponentGameBoard) { - int result = 0; + int result; playerCard.attackMonster(opponentCard); if (opponentCard.getDefenceMode() == DefensePosition.DO) { if (opponentCard.getDefense() < playerCard.getAttack()) { @@ -450,6 +450,7 @@ public int attackToOpponentCardInDefensePosition(MonsterCard playerCard, Monster result = 10; } else result = 11; } else { + opponentCard.setDefenceMode(DefensePosition.DO); this.lastOpponentMonsterCard = opponentCard; if (opponentCard.getDefense() < playerCard.getAttack()) { result = 12; diff --git a/src/main/java/view/gui/DuelMenuGui.java b/src/main/java/view/gui/DuelMenuGui.java index 1cfeffcd..a9b58eb7 100644 --- a/src/main/java/view/gui/DuelMenuGui.java +++ b/src/main/java/view/gui/DuelMenuGui.java @@ -383,6 +383,9 @@ public void updateSelectedCard() { public void showGraveyard() { showGraveyardPopupWindow = new Stage(); showGraveyardPopupWindow.initModality(Modality.APPLICATION_MODAL); + showGraveyardPopupWindow.getIcons().add(GetImage.getGameIcon()); + showGraveyardPopupWindow.setTitle("Graveyard"); + BorderPane borderPane = new BorderPane(); Text text = new Text("your graveyard"); text.setFont(new Font("Arial", 14));