Additional tests for Flying and CantBlock abilities. Passed.

This commit is contained in:
magenoxx 2012-07-18 15:10:52 +04:00
parent c304812770
commit f9263d5d7d
2 changed files with 74 additions and 0 deletions

View file

@ -212,4 +212,28 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
assertPermanentCount(playerA, "Lurebound Scarecrow", 2);
}
@Test
public void testCopiedFlyingWorks() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 2);
addCard(Constants.Zone.HAND, playerA, "Phantasmal Image");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Fervor");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Elite Vanguard");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Azure Drake");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Llanowar Elves");
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Phantasmal Image");
attack(1, playerA, "Azure Drake");
block(1, playerB, "Llanowar Elves", "Azure Drake");
attack(2, playerB, "Azure Drake");
block(2, playerA, "Elite Vanguard", "Azure Drake");
setStopAt(2, Constants.PhaseStep.END_TURN);
execute();
assertLife(playerB, 18);
assertLife(playerA, 18);
}
}

View file

@ -41,4 +41,54 @@ public class GravecrawlerTest extends CardTestPlayerBase {
assertGraveyardCount(playerA, 1);
}
@Test
public void testCopiedCantBlockAbilityWorks() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 3);
addCard(Constants.Zone.HAND, playerA, "Cryptoplasm");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Fervor");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Elite Vanguard");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Gravecrawler");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Llanowar Elves");
addTarget(playerA, "Gravecrawler");
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Cryptoplasm");
attack(3, playerA, "Elite Vanguard");
block(3, playerB, "Gravecrawler", "Elite Vanguard");
attack(4, playerB, "Llanowar Elves");
block(4, playerA, "Gravecrawler", "Llanowar Elves");
setStopAt(4, Constants.PhaseStep.END_TURN);
execute();
assertPermanentCount(playerA, "Gravecrawler", 1);
assertPermanentCount(playerB, "Gravecrawler", 1);
assertLife(playerB, 18);
assertLife(playerA, 19);
}
@Test
public void testCantBlockAbilityAfterChangeZone() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain", 1);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Fervor");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Elite Vanguard");
addCard(Constants.Zone.HAND, playerA, "Lightning Bolt");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Swamp", 1);
addCard(Constants.Zone.BATTLEFIELD, playerB, "Gravecrawler");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Walking Corpse");
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Gravecrawler");
castSpell(2, Constants.PhaseStep.PRECOMBAT_MAIN, playerB, "Gravecrawler");
attack(3, playerA, "Elite Vanguard");
block(3, playerB, "Gravecrawler", "Elite Vanguard");
setStopAt(3, Constants.PhaseStep.END_TURN);
execute();
assertPermanentCount(playerB, "Gravecrawler", 1);
assertLife(playerB, 18);
}
}