mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Fixed a problem with "put into the graveyard from anywhere triggers" that checked wrongly the state of the source object on the battlefield if went to graveyard itself.
This commit is contained in:
parent
d40afd9ef5
commit
eb0ae55257
16 changed files with 229 additions and 128 deletions
|
|
@ -110,4 +110,35 @@ public class UlamogTheInfiniteGyreTest extends CardTestPlayerBase {
|
|||
assertHandCount(playerA, 4);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Ixidron turned Ulamog, the Infinite Gyre to a 2/2 with no name and then
|
||||
* someone used an Wrath of the Gods effect. Ulamog, the Infinite Gyre
|
||||
* entered the graveyard without triggering his shuffle effect (just like
|
||||
* this case: http://www.mtgsalvation.com/forums/magi ... nd-kozilek).
|
||||
*/
|
||||
@Test
|
||||
public void testFaceDownToGraveyard() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
// When you cast Kozilek, Butcher of Truth, draw four cards.
|
||||
// Annihilator 4 (Whenever this creature attacks, defending player sacrifices four permanents.)
|
||||
// When Kozilek is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Kozilek, Butcher of Truth"); // {10}
|
||||
// As Ixidron enters the battlefield, turn all other nontoken creatures face down.
|
||||
// Ixidron's power and toughness are each equal to the number of face-down creatures on the battlefield.
|
||||
addCard(Zone.HAND, playerA, "Ixidron"); // {3}{U}{U}
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 4);
|
||||
addCard(Zone.HAND, playerB, "Wrath of God", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ixidron");
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Wrath of God");
|
||||
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Ixidron", 0);
|
||||
assertGraveyardCount(playerB, "Wrath of God", 1);
|
||||
assertGraveyardCount(playerA, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,24 +29,23 @@ package org.mage.test.cards.triggers.dies;
|
|||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* Thragtusk - Beast {4}{G}
|
||||
* When Thragtusk enters the battlefield, you gain 5 life.
|
||||
* When Thragtusk leaves the battlefield, put a 3/3 green Beast creature token onto the battlefield.
|
||||
*
|
||||
* Thragtusk - Beast {4}{G} When Thragtusk enters the battlefield, you gain 5
|
||||
* life. When Thragtusk leaves the battlefield, put a 3/3 green Beast creature
|
||||
* token onto the battlefield.
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ThragtuskTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* Test if a Thragtusk is copied by a PhyrexianMetamorph
|
||||
* that both triggers cotrrect work
|
||||
* Test if a Thragtusk is copied by a PhyrexianMetamorph that both triggers
|
||||
* cotrrect work
|
||||
*/
|
||||
@Test
|
||||
@Test
|
||||
public void testPhyrexianMetamorph() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
|
||||
// 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
|
||||
|
|
@ -57,9 +56,9 @@ public class ThragtuskTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerB, "Thragtusk", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Phyrexian Metamorph");
|
||||
setChoice(playerA, "Yes");
|
||||
setChoice(playerA, "Yes");
|
||||
setChoice(playerA, "Thragtusk");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Public Execution", "Thragtusk");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
|
|
@ -67,21 +66,22 @@ public class ThragtuskTest extends CardTestPlayerBase {
|
|||
|
||||
assertPermanentCount(playerB, "Thragtusk", 1);
|
||||
|
||||
assertGraveyardCount(playerA,"Phyrexian Metamorph", 1);
|
||||
assertGraveyardCount(playerB,"Public Execution", 1);
|
||||
assertGraveyardCount(playerA, "Phyrexian Metamorph", 1);
|
||||
assertGraveyardCount(playerB, "Public Execution", 1);
|
||||
|
||||
assertLife(playerA, 25);
|
||||
assertLife(playerB, 20); // Thragtusk ETB ability does not trigger if set to battlefield on test game start
|
||||
|
||||
assertPermanentCount(playerA, "Beast", 1);
|
||||
assertLife(playerB, 20); // Thragtusk ETB ability does not trigger if set to battlefield on test game start
|
||||
|
||||
assertPermanentCount(playerA, "Beast", 1);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if a Thragtusk is copied by a Phyrexian Metamorph
|
||||
* that leave battlefield ability does not work, if
|
||||
* the copy left all abilities by Turn to Frog
|
||||
* Test if a Thragtusk is copied by a Phyrexian Metamorph that leave
|
||||
* battlefield ability does not work, if the copy left all abilities by Turn
|
||||
* to Frog
|
||||
*/
|
||||
|
||||
|
||||
@Test
|
||||
public void testPhyrexianMetamorphTurnToFrog() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
|
||||
|
|
@ -96,32 +96,31 @@ public class ThragtuskTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerB, "Thragtusk", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Phyrexian Metamorph");
|
||||
setChoice(playerA, "Yes");
|
||||
setChoice(playerA, "Yes");
|
||||
setChoice(playerA, "Thragtusk");
|
||||
|
||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerB, "Tortoise Formation");
|
||||
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.DECLARE_ATTACKERS, playerB, "Turn to Frog", "Thragtusk");
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Public Execution", "Thragtusk");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB,"Tortoise Formation", 1);
|
||||
assertGraveyardCount(playerB,"Turn to Frog", 1);
|
||||
|
||||
assertGraveyardCount(playerB, "Tortoise Formation", 1);
|
||||
assertGraveyardCount(playerB, "Turn to Frog", 1);
|
||||
|
||||
assertPermanentCount(playerB, "Thragtusk", 1);
|
||||
assertPermanentCount(playerA, "Thragtusk", 0);
|
||||
|
||||
assertGraveyardCount(playerA,"Phyrexian Metamorph", 1);
|
||||
assertGraveyardCount(playerB,"Public Execution", 1);
|
||||
assertGraveyardCount(playerA, "Phyrexian Metamorph", 1);
|
||||
assertGraveyardCount(playerB, "Public Execution", 1);
|
||||
|
||||
assertLife(playerA, 25);
|
||||
assertLife(playerB, 20); // Thragtusk ETB ability does not trigger if set to battlefield on test game start
|
||||
|
||||
assertPermanentCount(playerA, "Beast", 0);
|
||||
assertLife(playerB, 20); // Thragtusk ETB ability does not trigger if set to battlefield on test game start
|
||||
|
||||
}
|
||||
assertPermanentCount(playerA, "Beast", 0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue