mirror of
https://github.com/correl/mage.git
synced 2025-04-06 09:13:45 -09:00
Added test for #4499
This commit is contained in:
parent
41abefa8e4
commit
126898f70a
1 changed files with 25 additions and 2 deletions
|
@ -19,8 +19,29 @@ public class AfflictTest extends CardTestPlayerBase {
|
||||||
attack(1, playerA, khenra);
|
attack(1, playerA, khenra);
|
||||||
block(1, playerB, elves, khenra);
|
block(1, playerB, elves, khenra);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
|
assertLife(playerB, 19);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testBecomesDoubleBlocked() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, khenra);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, elves, 2);
|
||||||
|
|
||||||
|
// afflict must trigger only once
|
||||||
|
attack(1, playerA, khenra);
|
||||||
|
block(1, playerB, elves + ":0", khenra);
|
||||||
|
block(1, playerB, elves + ":1", khenra);
|
||||||
|
setChoice(playerA, "X=1"); // assign damage
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
assertLife(playerB, 19);
|
assertLife(playerB, 19);
|
||||||
|
|
||||||
|
@ -28,17 +49,17 @@ public class AfflictTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testNotBlocked() {
|
public void testNotBlocked() {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, khenra);
|
addCard(Zone.BATTLEFIELD, playerA, khenra);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, elves);
|
addCard(Zone.BATTLEFIELD, playerB, elves);
|
||||||
|
|
||||||
attack(1, playerA, khenra);
|
attack(1, playerA, khenra);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
assertLife(playerB, 18);
|
assertLife(playerB, 18);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// My afflict didn't come through after using Endless Sands on my own creature. The afflict ability was on the stack already.
|
// My afflict didn't come through after using Endless Sands on my own creature. The afflict ability was on the stack already.
|
||||||
|
@ -62,9 +83,11 @@ public class AfflictTest extends CardTestPlayerBase {
|
||||||
attack(1, playerA, "Frontline Devastator");
|
attack(1, playerA, "Frontline Devastator");
|
||||||
block(1, playerB, "Ruin Rat", "Frontline Devastator");
|
block(1, playerB, "Ruin Rat", "Frontline Devastator");
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
activateAbility(1, PhaseStep.DECLARE_BLOCKERS, playerA, "{2},", "Frontline Devastator");
|
activateAbility(1, PhaseStep.DECLARE_BLOCKERS, playerA, "{2},", "Frontline Devastator");
|
||||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
execute();
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
assertExileCount(playerA, "Frontline Devastator", 1);
|
assertExileCount(playerA, "Frontline Devastator", 1);
|
||||||
assertPermanentCount(playerB, "Ruin Rat", 1);
|
assertPermanentCount(playerB, "Ruin Rat", 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue