mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Test and fix for triggered abilities of double faced cards
This commit is contained in:
parent
17dbe0ae57
commit
f641ffe77b
2 changed files with 64 additions and 16 deletions
|
|
@ -6,7 +6,7 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward
|
||||
* @author BetaSteward, noxx
|
||||
*/
|
||||
public class HuntmasterOfTheFellsTest extends CardTestPlayerBase {
|
||||
|
||||
|
|
@ -28,5 +28,31 @@ public class HuntmasterOfTheFellsTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Ravager of the Fells", 1);
|
||||
assertPermanentCount(playerB, "Ornithopter", 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Tests first trigger happens both on enter battlefield and transform events
|
||||
*/
|
||||
@Test
|
||||
public void testCard2() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain");
|
||||
addCard(Constants.Zone.HAND, playerA, "Huntmaster of the Fells");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Ornithopter");
|
||||
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Mountain", 2);
|
||||
addCard(Constants.Zone.HAND, playerB, "Lightning Bolt", 2);
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Huntmaster of the Fells");
|
||||
castSpell(3, Constants.PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", playerA);
|
||||
castSpell(3, Constants.PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", playerA);
|
||||
setStopAt(4, Constants.PhaseStep.DRAW);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 18); // -6 damage, +4 life
|
||||
assertLife(playerB, 18);
|
||||
assertPermanentCount(playerA, "Wolf", 2);
|
||||
assertPermanentCount(playerA, "Ravager of the Fells", 0); // transformed back
|
||||
assertPermanentCount(playerA, "Huntmaster of the Fells", 1);
|
||||
assertPermanentCount(playerB, "Ornithopter", 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue