mirror of
https://github.com/correl/mage.git
synced 2025-04-10 17:00:08 -09:00
Two tests for AsEntersBattlefieldAbility and Copy effect interaction. Passed.
This commit is contained in:
parent
0b27499ce0
commit
6eb199006d
1 changed files with 47 additions and 1 deletions
|
@ -36,7 +36,7 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
||||||
* Tests that copy effect will copy EntersBattlefieldTriggeredAbility and it will be applied.
|
* Tests that copy effect will copy EntersBattlefieldTriggeredAbility and it will be applied.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testCopiedEntersBattlefieldTriggeredAbility() {
|
public void testCopyEntersBattlefieldTriggeredAbility() {
|
||||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 2);
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
addCard(Constants.Zone.HAND, playerA, "Phantasmal Image");
|
addCard(Constants.Zone.HAND, playerA, "Phantasmal Image");
|
||||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Howling Banshee");
|
addCard(Constants.Zone.BATTLEFIELD, playerB, "Howling Banshee");
|
||||||
|
@ -166,4 +166,50 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
||||||
assertLife(playerB, 18);
|
assertLife(playerB, 18);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests that copy effect will copy AsEntersBattlefieldAbility and will choose another color.
|
||||||
|
* As there is no permanent of the second color, copy of Lurebound Scarecrow will be sacrificed.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testCopyAsEntersBattlefieldAbility() {
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Llanowar Elves");
|
||||||
|
addCard(Constants.Zone.HAND, playerA, "Phantasmal Image");
|
||||||
|
addCard(Constants.Zone.HAND, playerA, "Lurebound Scarecrow");
|
||||||
|
|
||||||
|
setChoice(playerA, "Green");
|
||||||
|
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Lurebound Scarecrow");
|
||||||
|
setChoice(playerA, "Red");
|
||||||
|
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Phantasmal Image");
|
||||||
|
|
||||||
|
setStopAt(1, Constants.PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertPermanentCount(playerA, "Lurebound Scarecrow", 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests that copy effect will copy AsEntersBattlefieldAbility and will choose another color.
|
||||||
|
* Both Lurebound Scarecrow cards should stay on battlefield.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testCopyAsEntersBattlefieldAbility2() {
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Llanowar Elves");
|
||||||
|
addCard(Constants.Zone.BATTLEFIELD, playerA, "Raging Goblin");
|
||||||
|
addCard(Constants.Zone.HAND, playerA, "Phantasmal Image");
|
||||||
|
addCard(Constants.Zone.HAND, playerA, "Lurebound Scarecrow");
|
||||||
|
|
||||||
|
setChoice(playerA, "Green");
|
||||||
|
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Lurebound Scarecrow");
|
||||||
|
setChoice(playerA, "Red");
|
||||||
|
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Phantasmal Image");
|
||||||
|
|
||||||
|
setStopAt(1, Constants.PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertPermanentCount(playerA, "Lurebound Scarecrow", 2);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue