mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 12:52:06 -08:00
[REX] Implement Ian Malcolm, Chaotician (#12117)
* Start on Ian Malcolm, Chaotician, missing key effects * fox ANY clause in DrawNthCardTriggeredAbility * Get exile effect working * Start using Evelyn, the Covetous code * align exile effect * align player clause * align card type clause * align counter check clause * align mana clause * add ownership clause * remove redundant comments * fix redundant mana clause description * fix counter clause in mana cost effect * fix active clause in mana effect * use MageObjectReference to associate exiled cards with an Ian Malcolm instance * optimize imports * Start tests, failing currently * fix test and add blink test * fix signature of constructor * fix order of super() call in checkTrigger * clarify hash maps in watcher * use correct AsThoughEffect * document header of checkExile * generalize modal and double faced cards for LKI fetch * remove land played event for watcher * Use custom MageIdentifier to filter usedMap
This commit is contained in:
parent
f8f9b0caa0
commit
40143c648f
5 changed files with 398 additions and 1 deletions
|
|
@ -0,0 +1,108 @@
|
|||
package org.mage.test.cards.watchers;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestCommander4Players;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jimga150
|
||||
*/
|
||||
public class IanMalcolmChaoticianTests extends CardTestCommander4Players {
|
||||
|
||||
@Test
|
||||
public void testManaCostsandWatcher() {
|
||||
|
||||
skipInitShuffling();
|
||||
|
||||
// Whenever a player draws their second card each turn, that player exiles the top card of their library.
|
||||
// During each player's turn, that player may cast a spell from among the cards they don't own exiled with
|
||||
// Ian Malcolm, Chaotician, and mana of any type can be spent to cast it.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Ian Malcolm, Chaotician");
|
||||
|
||||
// Flying
|
||||
// At the beginning of your draw step, draw an additional card.
|
||||
// At the beginning of your end step, discard your hand.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Avaricious Dragon");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Avaricious Dragon");
|
||||
addCard(Zone.BATTLEFIELD, playerC, "Avaricious Dragon");
|
||||
addCard(Zone.BATTLEFIELD, playerD, "Avaricious Dragon");
|
||||
|
||||
addCard(Zone.LIBRARY, playerA, "Horde of Notions", 3);
|
||||
addCard(Zone.LIBRARY, playerB, "Fusion Elemental", 10);
|
||||
addCard(Zone.LIBRARY, playerC, "Chromanticore", 10);
|
||||
addCard(Zone.LIBRARY, playerD, "Garth One-Eye", 10);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 15);
|
||||
|
||||
// Should be able to cast all cards exiled from other players' decks
|
||||
checkPlayableAbility("Can't cast card exiled with this Ian Malcolm", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Fusion Elemental", true);
|
||||
checkPlayableAbility("Can't cast card exiled with this Ian Malcolm", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Chromanticore", true);
|
||||
checkPlayableAbility("Can't cast card exiled with this Ian Malcolm", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Garth One-Eye", true);
|
||||
|
||||
// Should NOT be able to cast own card exiled in same way
|
||||
checkPlayableAbility("Able to cast Horde of Notions, but should not be.", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Horde of Notions", false);
|
||||
|
||||
// Cast a card exiled with Ian Malcolm, preventing any future casts from this zone on this turn.
|
||||
castSpell(5, PhaseStep.PRECOMBAT_MAIN, playerA, "Fusion Elemental", true);
|
||||
|
||||
checkPlayableAbility("Able to cast Chromanticore, but should not be due to watcher.", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Chromanticore", false);
|
||||
checkPlayableAbility("Able to cast Garth One-Eye, but should not be due to watcher.", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Garth One-Eye", false);
|
||||
|
||||
setStopAt(5, PhaseStep.END_TURN);
|
||||
setStrictChooseMode(true);
|
||||
execute();
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBlink() {
|
||||
|
||||
skipInitShuffling();
|
||||
|
||||
// Whenever a player draws their second card each turn, that player exiles the top card of their library.
|
||||
// During each player's turn, that player may cast a spell from among the cards they don't own exiled with
|
||||
// Ian Malcolm, Chaotician, and mana of any type can be spent to cast it.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Ian Malcolm, Chaotician");
|
||||
|
||||
// Flying
|
||||
// At the beginning of your draw step, draw an additional card.
|
||||
// At the beginning of your end step, discard your hand.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Heightened Awareness");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Heightened Awareness");
|
||||
addCard(Zone.BATTLEFIELD, playerC, "Heightened Awareness");
|
||||
addCard(Zone.BATTLEFIELD, playerD, "Heightened Awareness");
|
||||
|
||||
addCard(Zone.LIBRARY, playerA, "Horde of Notions", 3);
|
||||
addCard(Zone.LIBRARY, playerA, "Ephemerate", 1);
|
||||
addCard(Zone.LIBRARY, playerB, "Fusion Elemental", 10);
|
||||
addCard(Zone.LIBRARY, playerC, "Chromanticore", 10);
|
||||
addCard(Zone.LIBRARY, playerD, "Garth One-Eye", 10);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 15);
|
||||
|
||||
// Should be able to cast all cards exiled from other players' decks
|
||||
checkPlayableAbility("Can't cast card exiled with this Ian Malcolm", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Fusion Elemental", true);
|
||||
checkPlayableAbility("Can't cast card exiled with this Ian Malcolm", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Chromanticore", true);
|
||||
checkPlayableAbility("Can't cast card exiled with this Ian Malcolm", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Garth One-Eye", true);
|
||||
|
||||
// Should NOT be able to cast own card exiled in same way
|
||||
checkPlayableAbility("Able to cast Horde of Notions, but should not be.", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Horde of Notions", false);
|
||||
|
||||
// Blink Ian Malcolm, causing all cards in his current exile zone to become uncastable
|
||||
castSpell(5, PhaseStep.PRECOMBAT_MAIN, playerA, "Ephemerate", true);
|
||||
addTarget(playerA, "Ian Malcolm, Chaotician");
|
||||
|
||||
// Should no longer be able to cast all cards exiled from other players' decks
|
||||
checkPlayableAbility("Can't cast card exiled with this Ian Malcolm", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Fusion Elemental", false);
|
||||
checkPlayableAbility("Can't cast card exiled with this Ian Malcolm", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Chromanticore", false);
|
||||
checkPlayableAbility("Can't cast card exiled with this Ian Malcolm", 5, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Garth One-Eye", false);
|
||||
|
||||
setStopAt(5, PhaseStep.END_TURN);
|
||||
setStrictChooseMode(true);
|
||||
execute();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue