Test and fix for Issue#42: Creature with undying didn't forget -1/-1 after dying and returning from graveyard

This commit is contained in:
magenoxx 2012-08-16 00:53:42 +04:00
parent 9d99029c75
commit 7d9b338328
4 changed files with 35 additions and 0 deletions

View file

@ -27,6 +27,26 @@ public class UndyingTest extends CardTestPlayerBase {
assertPowerToughness(playerA, "Geralf's Messenger", 4, 3);
}
/**
* Tests boost weren't be applied second time when creature back to battlefield
*/
@Test
public void testWithMassBoost() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Strangleroot Geist");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Swamp", 3);
addCard(Constants.Zone.HAND, playerB, "Cower in Fear");
castSpell(2, Constants.PhaseStep.PRECOMBAT_MAIN, playerB, "Cower in Fear");
setStopAt(2, Constants.PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerA, "Strangleroot Geist", 1);
// dies then returned with +1/+1 counter (and boost doesn't work anymore)
assertPowerToughness(playerA, "Strangleroot Geist", 3, 2);
}
/**
* Tests "Target creature gains undying until end of turn"
*/