forked from External/mage
Fixed that a planeswalker that left the battlefield was not correctly removed from combat.
This commit is contained in:
parent
ff298938c1
commit
9f35637e6d
4 changed files with 68 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue