forked from External/mage
2 failing tests for copying effect targeting double-faced cards
This commit is contained in:
parent
99a567a00e
commit
47cf770318
1 changed files with 74 additions and 0 deletions
|
|
@ -36,4 +36,78 @@ public class TwoFacedCardEffectsTest extends CardTestPlayerBase {
|
|||
Assert.assertEquals(2, eliteInquisitor.getToughness().getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests copying card with transform
|
||||
*/
|
||||
@Test
|
||||
public void testCopyCardWithTransform() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||
addCard(Constants.Zone.HAND, playerA, "Mayor of Avabruck");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Island", 4);
|
||||
addCard(Constants.Zone.HAND, playerB, "Clone");
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Mayor of Avabruck");
|
||||
|
||||
castSpell(2, Constants.PhaseStep.PRECOMBAT_MAIN, playerB, "Clone");
|
||||
|
||||
setStopAt(2, Constants.PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 0);
|
||||
assertHandCount(playerB, 1);
|
||||
|
||||
assertPermanentCount(playerA, "Mayor of Avabruck", 1);
|
||||
assertPermanentCount(playerB, "Mayor of Avabruck", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests copied card should NOT be possible to transform
|
||||
*/
|
||||
@Test
|
||||
public void testCopyCantTransform() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||
addCard(Constants.Zone.HAND, playerA, "Mayor of Avabruck");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Island", 4);
|
||||
addCard(Constants.Zone.HAND, playerB, "Clone");
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Mayor of Avabruck");
|
||||
|
||||
castSpell(2, Constants.PhaseStep.PRECOMBAT_MAIN, playerB, "Clone");
|
||||
|
||||
setStopAt(5, Constants.PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 2);
|
||||
assertHandCount(playerB, 1);
|
||||
|
||||
// should transform - original
|
||||
assertPermanentCount(playerA, "Howlpack Alpha", 1);
|
||||
// should not transform - copy
|
||||
assertPermanentCount(playerB, "Mayor of Avabruck", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests copying already transformed card
|
||||
*/
|
||||
@Test
|
||||
public void testCopyAlreadyTransformedCard() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mayor of Avabruck");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Island", 4);
|
||||
addCard(Constants.Zone.HAND, playerB, "Clone");
|
||||
|
||||
// copy already transformed
|
||||
castSpell(2, Constants.PhaseStep.PRECOMBAT_MAIN, playerB, "Clone");
|
||||
|
||||
setStopAt(2, Constants.PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 0);
|
||||
assertHandCount(playerB, 1);
|
||||
|
||||
// should transform - original
|
||||
assertPermanentCount(playerA, "Howlpack Alpha", 1);
|
||||
// check copying card is also transformed
|
||||
assertPermanentCount(playerB, "Howlpack Alpha", 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue