mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 04:22:01 -08:00
new ExileReturnBattlefieldNextEndStepTargetEffect (#11251)
* adjust ExileThenReturnTargetEffect * initial rework ExileReturnBattlefieldNextEndStepTargetEffect (test coverage provided by CloudshiftTest) * refactor some more cards * refactor more straightforward cards * add params and more refactoring * text fixes * maintain order in set * fix Lae'zel's Acrobatics and add test
This commit is contained in:
parent
c8e2282a79
commit
6e18dbd2e4
29 changed files with 402 additions and 1182 deletions
|
|
@ -0,0 +1,83 @@
|
|||
package org.mage.test.cards.single.clb;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
public class LaezelsAcrobaticsTest extends CardTestPlayerBase {
|
||||
|
||||
// {3}{W} Instant
|
||||
// Exile all nontoken creatures you control, then roll a d20.
|
||||
// 1—9 | Return those cards to the battlefield under their owner’s control at the beginning of the next end step.
|
||||
// 10—20 | Return those cards to the battlefield under their owner’s control, then exile them again. Return those cards to the battlefield under their owner’s control at the beginning of the next end step.
|
||||
private static final String acrobatics = "Lae'zel's Acrobatics";
|
||||
|
||||
// {2}{W} Creature — Human Knight
|
||||
// First strike
|
||||
// When Attended Knight enters the battlefield, create a 1/1 white Soldier creature token.
|
||||
private static final String knight = "Attended Knight";
|
||||
// When Auramancer enters the battlefield, you may return target enchantment card from your graveyard to your hand.
|
||||
private static final String auramancer = "Auramancer";
|
||||
private static final String wings = "Nimbus Wings"; // aura
|
||||
// Whenever you roll one or more dice, Brazen Dwarf deals 1 damage to each opponent.
|
||||
private static final String dwarf = "Brazen Dwarf"; // not on the battlefield when die rolled, so should not trigger
|
||||
|
||||
@Test
|
||||
public void testRollLow() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 7);
|
||||
addCard(Zone.BATTLEFIELD, playerA, auramancer);
|
||||
addCard(Zone.BATTLEFIELD, playerA, dwarf);
|
||||
addCard(Zone.HAND, playerA, knight);
|
||||
addCard(Zone.HAND, playerA, acrobatics);
|
||||
addCard(Zone.GRAVEYARD, playerA, wings, 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, knight);
|
||||
setDieRollResult(playerA, 9);
|
||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerA, acrobatics);
|
||||
setChoice(playerA, "When {this} enters the battlefield, create"); // order triggers
|
||||
setChoice(playerA, true); // Auramancer: yes to return
|
||||
addTarget(playerA, wings); // enchantment to return
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, wings, 1);
|
||||
assertHandCount(playerA, wings, 1);
|
||||
assertPermanentCount(playerA, "Soldier Token", 2);
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRollHigh() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 7);
|
||||
addCard(Zone.BATTLEFIELD, playerA, auramancer);
|
||||
addCard(Zone.BATTLEFIELD, playerA, dwarf);
|
||||
addCard(Zone.HAND, playerA, knight);
|
||||
addCard(Zone.HAND, playerA, acrobatics);
|
||||
addCard(Zone.GRAVEYARD, playerA, wings, 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, knight);
|
||||
setDieRollResult(playerA, 10);
|
||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerA, acrobatics);
|
||||
setChoice(playerA, "When {this} enters the battlefield, create"); // order triggers
|
||||
setChoice(playerA, true); // Auramancer: yes to return
|
||||
addTarget(playerA, wings); // enchantment to return
|
||||
setChoice(playerA, "When {this} enters the battlefield, create"); // order triggers
|
||||
setChoice(playerA, true); // Auramancer: yes to return
|
||||
addTarget(playerA, wings); // enchantment to return
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, wings, 0);
|
||||
assertHandCount(playerA, wings, 2);
|
||||
assertPermanentCount(playerA, "Soldier Token", 3);
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue