mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
Merge origin/master
This commit is contained in:
commit
aa525bf0d2
110 changed files with 1531 additions and 1545 deletions
|
|
@ -16,7 +16,10 @@ public class ProteanHydraTest extends CardTestPlayerBase {
|
|||
@Test
|
||||
public void testEnteringWithCounters() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 5);
|
||||
addCard(Zone.HAND, playerA, "Protean Hydra");
|
||||
// Protean Hydra enters the battlefield with X +1/+1 counters on it.
|
||||
// If damage would be dealt to Protean Hydra, prevent that damage and remove that many +1/+1 counters from it.
|
||||
// Whenever a +1/+1 counter is removed from Protean Hydra, put two +1/+1 counters on it at the beginning of the next end step.
|
||||
addCard(Zone.HAND, playerA, "Protean Hydra"); // CREATURE - {X}{G}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Protean Hydra");
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class MovingCounterTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
|
|
@ -51,12 +50,11 @@ public class MovingCounterTest extends CardTestPlayerBase {
|
|||
|
||||
// Move any number of +1/+1 counters from target creature onto another target creature with the same controller.
|
||||
addCard(Zone.HAND, playerA, "Bioshift", 1);
|
||||
|
||||
// Protean Hydra enters the battlefield with X +1/+1 counters on it.
|
||||
// If damage would be dealt to Protean Hydra, prevent that damage and remove that many +1/+1 counters from it.
|
||||
// Whenever a +1/+1 counter is removed from Protean Hydra, put two +1/+1 counters on it at the beginning of the next end step.
|
||||
addCard(Zone.HAND, playerA, "Protean Hydra", 1);
|
||||
|
||||
// Protean Hydra enters the battlefield with X +1/+1 counters on it.
|
||||
// If damage would be dealt to Protean Hydra, prevent that damage and remove that many +1/+1 counters from it.
|
||||
// Whenever a +1/+1 counter is removed from Protean Hydra, put two +1/+1 counters on it at the beginning of the next end step.
|
||||
addCard(Zone.HAND, playerA, "Protean Hydra", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Protean Hydra");
|
||||
setChoice(playerA, "X=4");
|
||||
|
|
@ -67,14 +65,45 @@ public class MovingCounterTest extends CardTestPlayerBase {
|
|||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Bioshift", 1);
|
||||
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 1);
|
||||
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 1);
|
||||
assertPowerToughness(playerA, "Silvercoat Lion", 4, 4); // added 2 counters
|
||||
|
||||
assertPermanentCount(playerA, "Protean Hydra", 1);
|
||||
assertPermanentCount(playerA, "Protean Hydra", 1);
|
||||
assertPowerToughness(playerA, "Protean Hydra", 6, 6); // started with 4, removed 2, added 4 at end = 6
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* I'm having an issue when using Bioshift to move only a portion of
|
||||
* counters to another creature. When I attempt to do this, it moves all of
|
||||
* the counters (and in some cases with my Simic deck) kills the creature.
|
||||
*/
|
||||
@Test
|
||||
public void testFateTransfer() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4);
|
||||
// Noxious Hatchling enters the battlefield with four -1/-1 counters on it.
|
||||
// Wither (This deals damage to creatures in the form of -1/-1 counters.)
|
||||
// Whenever you cast a black spell, remove a -1/-1 counter from Noxious Hatchling.
|
||||
// Whenever you cast a green spell, remove a -1/-1 counter from Noxious Hatchling.
|
||||
addCard(Zone.HAND, playerA, "Noxious Hatchling", 1);// 6/6
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Ruin Processor", 1); // Creature 7/8
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
|
||||
// Move all counters from target creature onto another target creature.
|
||||
addCard(Zone.HAND, playerB, "Fate Transfer", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Noxious Hatchling");
|
||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerB, "Fate Transfer", "Noxious Hatchling^Ruin Processor");
|
||||
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Fate Transfer", 1);
|
||||
|
||||
assertPowerToughness(playerA, "Noxious Hatchling", 6, 6);
|
||||
|
||||
assertPowerToughness(playerA, "Ruin Processor", 3, 4);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,8 +51,10 @@ public class MycosynthGolemTest extends CardTestPlayerBase {
|
|||
public void testSpellsAffinity() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
|
||||
// Affinity for artifacts
|
||||
// Artifact creature spells you cast have affinity for artifacts.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mycosynth Golem");
|
||||
addCard(Zone.HAND, playerA, "Alpha Myr");
|
||||
addCard(Zone.HAND, playerA, "Alpha Myr"); // Creature - Myr 2/1
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Alpha Myr");
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ public class SoulfireGrandMasterTest extends CardTestPlayerBase {
|
|||
@Test
|
||||
public void testSpellsReturnToHand() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||
// Lifelink
|
||||
// Instant and sorcery spells you control have lifelink.
|
||||
// {2}{U/R}{U/R}: The next time you cast an instant or sorcery spell from your hand this turn, put that card into your hand instead of your graveyard as it resolves.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Soulfire Grand Master");
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt");
|
||||
|
||||
|
|
@ -199,7 +202,6 @@ public class SoulfireGrandMasterTest extends CardTestPlayerBase {
|
|||
* Test that if Soulfire Grand Master has left the battlefield spell has no
|
||||
* longer lifelink
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testSoulfireLeft() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
|
|
@ -231,7 +233,6 @@ public class SoulfireGrandMasterTest extends CardTestPlayerBase {
|
|||
* the elemental, so stoke didnt resolve, but i still got the life from
|
||||
* lifelink.
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testSoulfireStokeTheFlames() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 8);
|
||||
|
|
@ -296,7 +297,6 @@ public class SoulfireGrandMasterTest extends CardTestPlayerBase {
|
|||
* Constructed.
|
||||
*
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testWithDeflectingPalm() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.mage.test.cards.conditional;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -14,10 +10,10 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
* @author jeff
|
||||
*/
|
||||
public class RootwaterMatriarchTest extends CardTestPlayerBase {
|
||||
|
||||
|
||||
@Test
|
||||
public void testTargetFail() {
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Rootwater Matriarch");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Memnite");
|
||||
|
||||
|
|
@ -25,73 +21,73 @@ public class RootwaterMatriarchTest extends CardTestPlayerBase {
|
|||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Rootwater Matriarch", 1);
|
||||
assertPermanentCount(playerB, "Memnite", 1);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testTargetSuccess() {
|
||||
|
||||
// {T}: Gain control of target creature for as long as that creature is enchanted
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Rootwater Matriarch");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Memnite");
|
||||
|
||||
|
||||
addCard(Zone.HAND, playerA, "Flight");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Flight", "Memnite");
|
||||
|
||||
activateAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "{T}: Gain control of target creature for as long as that creature is enchanted.", "Memnite");
|
||||
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Rootwater Matriarch", 1);
|
||||
assertPermanentCount(playerA, "Memnite", 1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testGainControlEnchantedTargetAndRWLeavesPlay() {
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Rootwater Matriarch");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Memnite");
|
||||
addCard(Zone.HAND, playerA, "Unsummon");
|
||||
addCard(Zone.HAND, playerA, "Flight");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Flight", "Memnite");
|
||||
|
||||
activateAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "{T}: Gain control of target creature for as long as that creature is enchanted.", "Memnite");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Unsummon", "Rootwater Matriarch");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Rootwater Matriarch", 0);
|
||||
assertPermanentCount(playerA, "Memnite", 1);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testGainControlEnchantedTargetAndAuraIsDisenchanted() {
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Rootwater Matriarch");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Memnite");
|
||||
addCard(Zone.HAND, playerA, "Disenchant");
|
||||
addCard(Zone.HAND, playerA, "Flight");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Flight", "Memnite");
|
||||
|
||||
activateAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "{T}: Gain control of target creature for as long as that creature is enchanted.", "Memnite");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Disenchant", "Flight");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Rootwater Matriarch", 1);
|
||||
assertPermanentCount(playerB, "Memnite", 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,6 +202,9 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Llanowar Elves");
|
||||
addCard(Zone.HAND, playerA, "Phantasmal Image");
|
||||
|
||||
// As Lurebound Scarecrow enters the battlefield, choose a color.
|
||||
// When you control no permanents of the chosen color, sacrifice Lurebound Scarecrow.
|
||||
addCard(Zone.HAND, playerA, "Lurebound Scarecrow");
|
||||
|
||||
setChoice(playerA, "Green");
|
||||
|
|
@ -324,7 +327,7 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerB, "Phantasmal Image");
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Phantasmal Image"); // not targeted
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, "Veil of Secrecy", "Frost Titan"); // so it's no longer targetable
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, "Veil of Secrecy", "Frost Titan"); // so it's no longer targetable
|
||||
setChoice(playerB, "Frost Titan");
|
||||
|
||||
castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "Terror", "Frost Titan"); // of player Bs Phantasmal Image copying Frost Titan
|
||||
|
|
@ -346,7 +349,7 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
|||
}
|
||||
|
||||
// I've casted a Phantasmal Image targeting opponent's Wurmcoil Engine
|
||||
// When my Phantasmal Image died, it didn't triggered the Wurmcoil Engine's last ability
|
||||
// When my Phantasmal Image died, it didn't triggered the Wurmcoil Engine's last ability
|
||||
// (When Wurmcoil Engine dies, put a 3/3 colorless Wurm artifact creature token with deathtouch and
|
||||
// a 3/3 colorless Wurm artifact creature token with lifelink onto the battlefield.)
|
||||
@Test
|
||||
|
|
@ -418,31 +421,39 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Action
|
||||
* Game State 1 -----------------> Game State 2
|
||||
* (On 'field) (Move to GY) (In graveyard)
|
||||
*
|
||||
* LTB abilities such as Persist are expceptional in that they trigger based on their existence and
|
||||
* state of objects before the event (Game State 1, when the card is on the battlefield) rather than
|
||||
* after (Game State 2, when the card is in the graveyard). It doesn't matter that the LTB ability
|
||||
* doesn't exist in Game State 2. [CR 603.6d]
|
||||
*
|
||||
* 603.6d Normally, objects that exist immediately after an event are checked to see if the event matched any trigger conditions.
|
||||
* Continuous effects that exist at that time are used to determine what the trigger conditions are and what the objects involved
|
||||
* in the event look like. However, some triggered abilities must be treated specially. Leaves-the-battlefield abilities, abilities
|
||||
* that trigger when a permanent phases out, abilities that trigger when an object that all players can see is put into a hand or
|
||||
* library, abilities that trigger specifically when an object becomes unattached, abilities that trigger when a player loses control
|
||||
* of an object, and abilities that trigger when a player planeswalks away from a plane will trigger based on their existence, and
|
||||
* the appearance of objects, prior to the event rather than afterward. The game has to “look back in time” to determine if these abilities trigger.
|
||||
*
|
||||
* Example: Two creatures are on the battlefield along with an artifact that has the ability “Whenever a creature dies, you gain 1 life.”
|
||||
* Someone plays a spell that destroys all artifacts, creatures, and enchantments. The artifact’s ability triggers twice, even though
|
||||
* the artifact goes to its owner’s graveyard at the same time as the creatures.
|
||||
*
|
||||
* Action Game State 1 -----------------> Game State 2 (On 'field) (Move to
|
||||
* GY) (In graveyard)
|
||||
*
|
||||
* LTB abilities such as Persist are expceptional in that they trigger based
|
||||
* on their existence and state of objects before the event (Game State 1,
|
||||
* when the card is on the battlefield) rather than after (Game State 2,
|
||||
* when the card is in the graveyard). It doesn't matter that the LTB
|
||||
* ability doesn't exist in Game State 2. [CR 603.6d]
|
||||
*
|
||||
* 603.6d Normally, objects that exist immediately after an event are
|
||||
* checked to see if the event matched any trigger conditions. Continuous
|
||||
* effects that exist at that time are used to determine what the trigger
|
||||
* conditions are and what the objects involved in the event look like.
|
||||
* However, some triggered abilities must be treated specially.
|
||||
* Leaves-the-battlefield abilities, abilities that trigger when a permanent
|
||||
* phases out, abilities that trigger when an object that all players can
|
||||
* see is put into a hand or library, abilities that trigger specifically
|
||||
* when an object becomes unattached, abilities that trigger when a player
|
||||
* loses control of an object, and abilities that trigger when a player
|
||||
* planeswalks away from a plane will trigger based on their existence, and
|
||||
* the appearance of objects, prior to the event rather than afterward. The
|
||||
* game has to “look back in time” to determine if these abilities trigger.
|
||||
*
|
||||
* Example: Two creatures are on the battlefield along with an artifact that
|
||||
* has the ability “Whenever a creature dies, you gain 1 life.” Someone
|
||||
* plays a spell that destroys all artifacts, creatures, and enchantments.
|
||||
* The artifact’s ability triggers twice, even though the artifact goes to
|
||||
* its owner’s graveyard at the same time as the creatures.
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testPersist() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
// When Kitchen Finks enters the battlefield, you gain 2 life.
|
||||
// Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it.)
|
||||
addCard(Zone.HAND, playerA, "Kitchen Finks");
|
||||
|
|
@ -452,21 +463,20 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 6);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||
|
||||
|
||||
// You may have Phantasmal Image enter the battlefield as a copy of any creature
|
||||
// on the battlefield, except it's an Illusion in addition to its other types and
|
||||
// it gains "When this creature becomes the target of a spell or ability, sacrifice it."
|
||||
// it gains "When this creature becomes the target of a spell or ability, sacrifice it."
|
||||
addCard(Zone.HAND, playerB, "Phantasmal Image");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Kitchen Finks");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Kitchen Finks");
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Phantasmal Image"); // not targeted
|
||||
setChoice(playerB, "Kitchen Finks");
|
||||
|
||||
|
||||
castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "Public Execution", "Kitchen Finks");
|
||||
setChoice(playerB, "Kitchen Finks");
|
||||
|
||||
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
|
|
@ -480,13 +490,13 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
|||
assertHandCount(playerB, "Phantasmal Image", 0);
|
||||
assertGraveyardCount(playerB, "Phantasmal Image", 0);
|
||||
assertPermanentCount(playerB, "Kitchen Finks", 1);
|
||||
assertPowerToughness(playerB, "Kitchen Finks", 2, 1);
|
||||
assertPowerToughness(playerB, "Kitchen Finks", 2, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testUndying() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||
// Undying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.)
|
||||
addCard(Zone.HAND, playerA, "Butcher Ghoul");
|
||||
|
||||
|
|
@ -495,21 +505,20 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 6);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||
|
||||
|
||||
// You may have Phantasmal Image enter the battlefield as a copy of any creature
|
||||
// on the battlefield, except it's an Illusion in addition to its other types and
|
||||
// it gains "When this creature becomes the target of a spell or ability, sacrifice it."
|
||||
// it gains "When this creature becomes the target of a spell or ability, sacrifice it."
|
||||
addCard(Zone.HAND, playerB, "Phantasmal Image");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Butcher Ghoul");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Butcher Ghoul");
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Phantasmal Image"); // not targeted
|
||||
setChoice(playerB, "Butcher Ghoul");
|
||||
|
||||
|
||||
castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "Public Execution", "Butcher Ghoul");
|
||||
setChoice(playerB, "Butcher Ghoul");
|
||||
|
||||
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
|
|
@ -523,29 +532,25 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
|||
assertHandCount(playerB, "Phantasmal Image", 0);
|
||||
assertGraveyardCount(playerB, "Phantasmal Image", 0);
|
||||
assertPermanentCount(playerB, "Butcher Ghoul", 1);
|
||||
assertPowerToughness(playerB, "Butcher Ghoul", 2, 2);
|
||||
assertPowerToughness(playerB, "Butcher Ghoul", 2, 2);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 12:29: Attacker: Wurmcoil Engine [466] (6/6) blocked by Wurmcoil Engine
|
||||
* [4ed] (6/6)
|
||||
* 12:29: yespair gains 6 life
|
||||
* 12:29: HipSomHap gains 6 life
|
||||
* 12:29: Wurmcoil Engine [4ed] died
|
||||
* 12:29: Ability triggers: Wurmcoil Engine [4ed] - When Wurmcoil Engine [4ed] dies, put a a 3/3 colorless
|
||||
* [4ed] (6/6) 12:29: yespair gains 6 life 12:29: HipSomHap gains 6 life
|
||||
* 12:29: Wurmcoil Engine [4ed] died 12:29: Ability triggers: Wurmcoil
|
||||
* Engine [4ed] - When Wurmcoil Engine [4ed] dies, put a a 3/3 colorless
|
||||
* Wurm artifact creature token with deathtouch onto the battlefield. Put a
|
||||
* a 3/3 colorless Wurm artifact creature token with lifelink onto the
|
||||
* battlefield.
|
||||
* 12:29: Phantasmal Image [466] died
|
||||
* 12:29: HipSomHap puts a Wurm [7d0] token onto the battlefield
|
||||
* 12:29: HipSomHap puts a Wurm [186] token onto the battlefield
|
||||
* battlefield. 12:29: Phantasmal Image [466] died 12:29: HipSomHap puts a
|
||||
* Wurm [7d0] token onto the battlefield 12:29: HipSomHap puts a Wurm [186]
|
||||
* token onto the battlefield
|
||||
*
|
||||
* To the best of my knowledge, the Phantasmal Image [466], which entered
|
||||
* the battlefield as a Wurmcoil Engine, should grant tokens through the
|
||||
* Dies-trigger as well, right?
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testDiesTriggered2() {
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Wurmcoil Engine");
|
||||
|
|
@ -570,5 +575,5 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Wurm", 2);
|
||||
assertPermanentCount(playerB, "Wurm", 2);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,10 +36,8 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class PhyrexianMetamorphTest extends CardTestPlayerBase {
|
||||
|
||||
|
||||
@Test
|
||||
public void testCopyCreature() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
|
||||
|
|
@ -48,7 +46,7 @@ public class PhyrexianMetamorphTest extends CardTestPlayerBase {
|
|||
// You may have Phyrexian Metamorph enter the battlefield as a copy of any artifact or creature on the battlefield, except it's an artifact in addition to its other types.
|
||||
addCard(Zone.HAND, playerA, "Phyrexian Metamorph"); // {3}{UP}
|
||||
addCard(Zone.HAND, playerA, "Cloudshift");
|
||||
|
||||
|
||||
//Flying
|
||||
// Vanishing 3 (This permanent enters the battlefield with three time counters on it. At the beginning of your upkeep, remove a time counter from it. When the last is removed, sacrifice it.)
|
||||
// When Aven Riftwatcher enters the battlefield or leaves the battlefield, you gain 2 life.
|
||||
|
|
@ -68,13 +66,13 @@ public class PhyrexianMetamorphTest extends CardTestPlayerBase {
|
|||
|
||||
assertLife(playerA, 24);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
|
||||
assertGraveyardCount(playerA, "Cloudshift", 1);
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Ponyback Brigade", 1);
|
||||
assertPermanentCount(playerA, "Goblin", 3);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An opponent cast Phyrexian Metamorph and cloned another opponent's
|
||||
|
|
@ -84,7 +82,6 @@ public class PhyrexianMetamorphTest extends CardTestPlayerBase {
|
|||
* to choose a new creature to clone when the Phyrexian Metamorph re-entered
|
||||
* the battlefield.
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testFlickerWithBrago() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
|
||||
|
|
@ -93,9 +90,9 @@ public class PhyrexianMetamorphTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerA, "Phyrexian Metamorph"); // {3}{UP}
|
||||
|
||||
// Flying
|
||||
// When Brago, King Eternal deals combat damage to a player, exile any number of target nonland permanents you control, then return those cards to the battlefield under their owner's control.
|
||||
// When Brago, King Eternal deals combat damage to a player, exile any number of target nonland permanents you control, then return those cards to the battlefield under their owner's control.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Brago, King Eternal"); // 2/4
|
||||
|
||||
|
||||
// Creatures you control have haste.
|
||||
// Cascade, cascade
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Maelstrom Wanderer"); // 7/5
|
||||
|
|
@ -106,19 +103,19 @@ public class PhyrexianMetamorphTest extends CardTestPlayerBase {
|
|||
setChoice(playerA, "Maelstrom Wanderer");
|
||||
|
||||
attack(3, playerA, "Brago, King Eternal");
|
||||
addTarget(playerA, "Maelstrom Wanderer");
|
||||
addTarget(playerA, "Maelstrom Wanderer");
|
||||
setChoice(playerA, "Ponyback Brigade");
|
||||
|
||||
|
||||
setStopAt(3, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 18);
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Ponyback Brigade", 1);
|
||||
assertPermanentCount(playerA, "Goblin", 3);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* I had a Harmonic Sliver, my opponent played Phyrexian Metamorph copying
|
||||
|
|
@ -126,7 +123,7 @@ public class PhyrexianMetamorphTest extends CardTestPlayerBase {
|
|||
* destroying ability, where it should have had two of them and triggered
|
||||
* twice (the Metamorph might have nothing to do with this)
|
||||
*/
|
||||
@Test
|
||||
@Test
|
||||
public void testHarmonicSliver() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
|
||||
|
||||
|
|
@ -137,7 +134,7 @@ public class PhyrexianMetamorphTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerB, "Kitesail", 1);
|
||||
// All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Harmonic Sliver"); // 2/4
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Phyrexian Metamorph");
|
||||
setChoice(playerA, "Harmonic Sliver");
|
||||
addTarget(playerA, "Alloy Myr");
|
||||
|
|
@ -145,66 +142,116 @@ public class PhyrexianMetamorphTest extends CardTestPlayerBase {
|
|||
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Harmonic Sliver", 1);
|
||||
|
||||
assertGraveyardCount(playerB, "Alloy Myr", 1);
|
||||
assertGraveyardCount(playerB, "Kitesail", 1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* If a Harmonic Sliver enters the battlefield
|
||||
* the controller has to destroy one artifacts or enchantments
|
||||
* If a Harmonic Sliver enters the battlefield the controller has to destroy
|
||||
* one artifacts or enchantments
|
||||
*/
|
||||
@Test
|
||||
public void testHarmonicSliverNative1() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||
|
||||
// All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
|
||||
addCard(Zone.HAND, playerA, "Harmonic Sliver");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Alloy Myr", 2); // 2/2
|
||||
|
||||
// All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
|
||||
addCard(Zone.HAND, playerA, "Harmonic Sliver");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Alloy Myr", 2); // 2/2
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Harmonic Sliver");
|
||||
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Harmonic Sliver", 1);
|
||||
|
||||
assertGraveyardCount(playerB, "Alloy Myr", 1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* If a Harmonic Sliver enters the battlefield and there is already one on the battlefield
|
||||
* the controller has to destroy two artifacts or enchantments
|
||||
* If a Harmonic Sliver enters the battlefield and there is already one on
|
||||
* the battlefield the controller has to destroy two artifacts or
|
||||
* enchantments
|
||||
*/
|
||||
@Test
|
||||
public void testHarmonicSliverNative2() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||
|
||||
addCard(Zone.HAND, playerA, "Harmonic Sliver");
|
||||
|
||||
addCard(Zone.HAND, playerA, "Harmonic Sliver");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Alloy Myr", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Kitesail", 1);
|
||||
// All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Harmonic Sliver"); // 2/4
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Harmonic Sliver");
|
||||
addTarget(playerA, "Alloy Myr");
|
||||
addTarget(playerA, "Kitesail");
|
||||
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Harmonic Sliver", 1);
|
||||
|
||||
assertGraveyardCount(playerB, "Alloy Myr", 1);
|
||||
assertGraveyardCount(playerB, "Kitesail", 1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* I cast Show and Tell, and put Sheoldred, Whispering One into play and my
|
||||
* opponent put Phyrexian Metamorph into play and he was able to clone my
|
||||
* Sheoldred, Whispering One.
|
||||
*
|
||||
* 6/1/2011 If Phyrexian Metamorph somehow enters the battlefield at the
|
||||
* same time as another permanent (due to Mass Polymorph or Liliana Vess's
|
||||
* third ability, for example), Phyrexian Metamorph can't become a copy of
|
||||
* that permanent. You may only choose a permanent that's already on the
|
||||
* battlefield.
|
||||
*
|
||||
* 400.6. If an object would move from one zone to another, determine what
|
||||
* event is moving the object. If the object is moving to a public zone, all
|
||||
* players look at it to see if it has any abilities that would affect the
|
||||
* move. Then any appropriate replacement effects, whether they come from
|
||||
* that object or from elsewhere, are applied to that event. If any effects
|
||||
* or rules try to do two or more contradictory or mutually exclusive things
|
||||
* to a particular object, that object's controller -- or its owner if it
|
||||
* has no controller -- chooses which effect to apply, and what that effect
|
||||
* does. (Note that multiple instances of the same thing may be mutually
|
||||
* exclusive; for example, two simultaneous "destroy" effects.) Then the
|
||||
* event moves the object.
|
||||
*/
|
||||
@Test
|
||||
public void testShowAndTell() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 3);
|
||||
|
||||
// Each player may put an artifact, creature, enchantment, or land card from his or her hand onto the battlefield.
|
||||
addCard(Zone.HAND, playerA, "Show and Tell"); // SORCERY {2}{U}
|
||||
|
||||
// Swampwalk
|
||||
// At the beginning of your upkeep, return target creature card from your graveyard to the battlefield.
|
||||
// At the beginning of each opponent's upkeep, that player sacrifices a creature.
|
||||
addCard(Zone.HAND, playerA, "Sheoldred, Whispering One");
|
||||
|
||||
addCard(Zone.HAND, playerB, "Phyrexian Metamorph");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Show and Tell");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Sheoldred, Whispering One", 1);
|
||||
assertPermanentCount(playerB, "Sheoldred, Whispering One", 0);
|
||||
|
||||
assertGraveyardCount(playerB, "Phyrexian Metamorph", 1);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,10 +92,10 @@ public class OblivionRingTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Jace Beleren");
|
||||
addCard(Zone.HAND, playerA, "Revoke Existence");
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "-1: Target player draws one card", playerA);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "-1: Target player draws a card", playerA);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oblivion Ring");
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Revoke Existence", "Oblivion Ring");
|
||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-1: Target player draws one card", playerA);
|
||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "-1: Target player draws a card", playerA);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
|
|
|||
|
|
@ -554,7 +554,7 @@ public class TestPlayer implements Player {
|
|||
if (!choices.isEmpty()) {
|
||||
for (String choice : choices) {
|
||||
for (int index = 0; index < rEffects.size(); index++) {
|
||||
if (choice.equals(rEffects.get(index))) {
|
||||
if (choice.equals(rEffects.get(Integer.toString(index)))) {
|
||||
choices.remove(choice);
|
||||
return index;
|
||||
}
|
||||
|
|
@ -1951,6 +1951,11 @@ public class TestPlayer implements Player {
|
|||
return computerPlayer.scry(value, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Set<Card> cards, Zone toZone, Ability source, Game game, boolean tapped, boolean faceDown, boolean byOwner, ArrayList<UUID> appliedEffects) {
|
||||
return computerPlayer.moveCards(cards, toZone, source, game, tapped, faceDown, byOwner, appliedEffects);
|
||||
}
|
||||
|
||||
public void setAIPlayer(boolean AIPlayer) {
|
||||
this.AIPlayer = AIPlayer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
|||
if (card == null) {
|
||||
throw new IllegalArgumentException("[TEST] Couldn't find a card: " + cardName);
|
||||
}
|
||||
PermanentCard p = new PermanentCard(card, null, currentGame);
|
||||
PermanentCard p = new PermanentCard(card, player.getId(), currentGame);
|
||||
p.setTapped(tapped);
|
||||
getBattlefieldCards(player).add(p);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue