mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Merge pull request #6245 from Dilnu/Despark
Allow players to block creatures attacking destroyed planeswalkers.
This commit is contained in:
commit
88f23bc0ee
2 changed files with 27 additions and 0 deletions
|
@ -127,4 +127,29 @@ public class AttackPlaneswalkerTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerB, "Silent Skimmer", 1);
|
||||
assertCounterCount("Kiora, the Crashing Wave", CounterType.LOYALTY, 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAttackedPlaneswalkerDestroyed() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Kiora, the Crashing Wave");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Plains");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp");
|
||||
addCard(Zone.HAND, playerB, "Despark");
|
||||
|
||||
attack(2, playerB, "Grizzly Bears", "Kiora, the Crashing Wave");
|
||||
castSpell(2, PhaseStep.DECLARE_ATTACKERS, playerB, "Despark");
|
||||
setChoice(playerB, "Kiora, the Crashing Wave");
|
||||
block(2, playerA, "Grizzly Bears", "Grizzly Bears");
|
||||
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
assertExileCount(playerA, "Kiora, the Crashing Wave", 1);
|
||||
assertGraveyardCount(playerA, "Grizzly Bears", 1);
|
||||
assertGraveyardCount(playerB, "Grizzly Bears", 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1607,6 +1607,8 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
Permanent permanent = game.getPermanent(group.getDefenderId());
|
||||
if (permanent != null) {
|
||||
playerDefenders.add(permanent.getControllerId());
|
||||
} else {
|
||||
playerDefenders.add(group.getDefendingPlayerId());
|
||||
}
|
||||
} else {
|
||||
playerDefenders.add(group.getDefenderId());
|
||||
|
|
Loading…
Reference in a new issue