mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Added a test.
This commit is contained in:
parent
cf5b474c29
commit
863829085e
1 changed files with 79 additions and 32 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package org.mage.test.cards.prevention;
|
package org.mage.test.cards.prevention;
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
|
@ -22,7 +21,6 @@ public class PreventAllDamageTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); // (2/2)
|
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); // (2/2)
|
||||||
|
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox", 2); // (2/4)
|
addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox", 2); // (2/4)
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2);
|
||||||
|
|
||||||
|
@ -51,7 +49,6 @@ public class PreventAllDamageTest extends CardTestPlayerBase {
|
||||||
assertLife(playerA, 20);
|
assertLife(playerA, 20);
|
||||||
assertLife(playerB, 20);
|
assertLife(playerB, 20);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -64,7 +61,6 @@ public class PreventAllDamageTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); // (2/2)
|
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); // (2/2)
|
||||||
|
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 2); // (2/4)
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 2); // (2/4)
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2);
|
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2);
|
||||||
|
|
||||||
|
@ -93,6 +89,57 @@ public class PreventAllDamageTest extends CardTestPlayerBase {
|
||||||
assertLife(playerA, 17);
|
assertLife(playerA, 17);
|
||||||
assertLife(playerB, 20);
|
assertLife(playerB, 20);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test_EnergyStorm() {
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||||
|
// Cumulative upkeep {1}
|
||||||
|
// Prevent all damage that would be dealt by instant and sorcery spells.
|
||||||
|
// Creatures with flying don't untap during their controllers' untap steps.
|
||||||
|
addCard(Zone.HAND, playerA, "Energy Storm"); // ENCHANTMENT {1}{W}
|
||||||
|
|
||||||
|
// Flying, vigilance
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Abbey Griffin", 1); // (2/2)
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); // (2/2)
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 4);
|
||||||
|
addCard(Zone.HAND, playerB, "Lightning Bolt", 2); // Instant {R}
|
||||||
|
// Fire Ambush deals 3 damage to any target.
|
||||||
|
addCard(Zone.HAND, playerB, "Fire Ambush", 2); // Sorcery {1}{R}
|
||||||
|
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Energy Storm");
|
||||||
|
|
||||||
|
attack(1, playerA, "Abbey Griffin");
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", playerA);
|
||||||
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", "Abbey Griffin");
|
||||||
|
|
||||||
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Fire Ambush", playerA);
|
||||||
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Fire Ambush", "Abbey Griffin");
|
||||||
|
|
||||||
|
attack(2, playerB, "Silvercoat Lion");
|
||||||
|
|
||||||
|
setChoice(playerA, "No"); // Pay {1}? Energy Storm - CumulativeUpkeepAbility: Cumulative upkeep {1}
|
||||||
|
|
||||||
|
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerA, "Energy Storm", 1);
|
||||||
|
assertPermanentCount(playerA, "Abbey Griffin", 1);
|
||||||
|
|
||||||
|
assertPermanentCount(playerB, "Silvercoat Lion", 1);
|
||||||
|
assertGraveyardCount(playerB, "Lightning Bolt", 2);
|
||||||
|
assertGraveyardCount(playerB, "Fire Ambush", 2);
|
||||||
|
|
||||||
|
assertLife(playerA, 18);
|
||||||
|
assertLife(playerB, 18);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue