Fixed that a planeswalker that left the battlefield was not correctly removed from combat.

This commit is contained in:
LevelX2 2016-02-25 21:41:38 +01:00
parent ff298938c1
commit 9f35637e6d
4 changed files with 68 additions and 12 deletions

View file

@ -1110,6 +1110,17 @@ public class Combat implements Serializable, Copyable<Combat> {
}
}
public boolean removePlaneswalkerFromCombat(UUID planeswalkerId, Game game, boolean withInfo) {
boolean result = false;
for (CombatGroup group : groups) {
if (group.getDefenderId().equals(planeswalkerId)) {
group.removeAttackedPlaneswalker(planeswalkerId);
result = true;
}
}
return result;
}
public boolean removeFromCombat(UUID creatureId, Game game, boolean withInfo) {
boolean result = false;
Permanent creature = game.getPermanent(creatureId);