- Added a test case for Death's Shadow on negative life under the new rules.

- Some clarifications in recent tests.
This commit is contained in:
Agetian
2017-07-25 15:32:10 +00:00
parent 92a760541b
commit ae35e4b589

View File

@@ -1315,7 +1315,9 @@ public class GameSimulatorTest extends SimulationTestCase {
assertTrue(countCardsWithName(sim.getSimulatedGameState(), "Zombie") == 3);
}
public void testPlayerXCondition() {
public void testPlayerXCount() {
// If playerXCount is operational, then conditions that count something about the player (e.g.
// cards in hand, life total) should work, similar to the Bloodghast "Haste" condition.
Game game = initAndCreateGame();
Player p = game.getPlayers().get(0);
Player opp = game.getPlayers().get(1);
@@ -1331,4 +1333,32 @@ public class GameSimulatorTest extends SimulationTestCase {
assert(bloodghast.hasKeyword("Haste"));
}
public void testDeathsShadowOnNegativeLife() {
// Death's Shadow should be 13/13 when its controller has negative life
Game game = initAndCreateGame();
Player p = game.getPlayers().get(0);
Player opp = game.getPlayers().get(1);
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
addCardToZone("Platinum Angel", p, ZoneType.Battlefield);
Card deathsShadow = addCardToZone("Death's Shadow", p, ZoneType.Battlefield);
addCardToZone("Mountain", opp, ZoneType.Battlefield);
Card bolt = addCardToZone("Lightning Bolt", opp, ZoneType.Hand);
p.setLife(1, null);
SpellAbility boltSA = bolt.getFirstSpellAbility();
boltSA.getTargets().add(p);
GameSimulator sim = createSimulator(game, p);
int score = sim.simulateSpellAbility(boltSA).value;
assertTrue(score > 0);
game.getAction().checkStateEffects(true);
assert(deathsShadow.getNetPower() == 13);
}
}