mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Merge branch 'fixPhasingPW' into 'master'
Fix Planeswalkers taking damage when phasing out during combat Closes #1060 See merge request core-developers/forge!3667
This commit is contained in:
@@ -595,6 +595,23 @@ public class Combat {
|
||||
}
|
||||
}
|
||||
|
||||
for (Card pw : getDefendingPlaneswalkers()) {
|
||||
if (pw.equals(c)) {
|
||||
Multimap<GameEntity, AttackingBand> attackerBuffer = ArrayListMultimap.create();
|
||||
Collection<AttackingBand> bands = attackedByBands.get(pw);
|
||||
for (AttackingBand abPW : bands) {
|
||||
unregisterDefender(c, abPW);
|
||||
// Rule 506.4c workaround to keep creatures in combat
|
||||
Card fake = new Card(-1, c.getGame());
|
||||
fake.setName("<Nothing>");
|
||||
fake.setController(c.getController(), 0);
|
||||
attackerBuffer.put(fake, abPW);
|
||||
}
|
||||
bands.clear();
|
||||
attackedByBands.putAll(attackerBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
// remove card from map
|
||||
while (blockedBands.values().remove(c));
|
||||
c.updateBlockingForView();
|
||||
|
||||
Reference in New Issue
Block a user