mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
GUI, game: fixed that attacking creature draws a wrong colored arrow after blocked creature removed (must be gray, close #11894)
This commit is contained in:
parent
aeded36c09
commit
db9bdc05c2
3 changed files with 8 additions and 1 deletions
|
|
@ -83,7 +83,7 @@ public enum CombatManager {
|
||||||
UUID defenderId = group.getDefenderId();
|
UUID defenderId = group.getDefenderId();
|
||||||
if (defenderId != null) {
|
if (defenderId != null) {
|
||||||
// if attacker was blocked then use another arrow color
|
// if attacker was blocked then use another arrow color
|
||||||
Color attackColor = group.getBlockers().isEmpty() ? ARROW_COLOR_ATTACKER : ARROW_COLOR_BLOCKED_ATTACKER;
|
Color attackColor = group.isBlocked() ? ARROW_COLOR_BLOCKED_ATTACKER : ARROW_COLOR_ATTACKER;
|
||||||
parentPoint = getParentPoint(attackerCard);
|
parentPoint = getParentPoint(attackerCard);
|
||||||
PlayAreaPanel p = MageFrame.getGamePlayers(gameId).get(defenderId);
|
PlayAreaPanel p = MageFrame.getGamePlayers(gameId).get(defenderId);
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ public class CombatGroupView implements Serializable {
|
||||||
|
|
||||||
private final CardsView attackers = new CardsView();
|
private final CardsView attackers = new CardsView();
|
||||||
private final CardsView blockers = new CardsView();
|
private final CardsView blockers = new CardsView();
|
||||||
|
private final boolean isBlocked;
|
||||||
private String defenderName = "";
|
private String defenderName = "";
|
||||||
private final UUID defenderId;
|
private final UUID defenderId;
|
||||||
|
|
||||||
|
|
@ -46,6 +47,7 @@ public class CombatGroupView implements Serializable {
|
||||||
blockers.put(id, new PermanentView(blocker, game.getCard(blocker.getId()), null, game));
|
blockers.put(id, new PermanentView(blocker, game.getCard(blocker.getId()), null, game));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
isBlocked = combatGroup.getBlocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDefenderName() {
|
public String getDefenderName() {
|
||||||
|
|
@ -63,4 +65,8 @@ public class CombatGroupView implements Serializable {
|
||||||
public UUID getDefenderId() {
|
public UUID getDefenderId() {
|
||||||
return defenderId;
|
return defenderId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isBlocked() {
|
||||||
|
return isBlocked;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ public class KetramoseTheNewDawnTest extends CardTestPlayerBase {
|
||||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||||
checkLife("exile single - after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 20 - 1);
|
checkLife("exile single - after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 20 - 1);
|
||||||
|
|
||||||
|
// exile multiple
|
||||||
// must have two triggers: exile on cost and exile on resolve
|
// must have two triggers: exile on cost and exile on resolve
|
||||||
// exile on cost
|
// exile on cost
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, Exile {this}");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, Exile {this}");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue