mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
* Added UT for #2864 Vesuvan Shapeshifter turn face up bug.
This commit is contained in:
parent
2feb764179
commit
b4553641eb
2 changed files with 45 additions and 4 deletions
|
|
@ -85,7 +85,7 @@ public class VesuvanShapeshifter extends CardImpl {
|
||||||
ability.setWorksFaceDown(false);
|
ability.setWorksFaceDown(false);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// At the beginning of your upkeep, you may turn this creature face down
|
// and gains "At the beginning of your upkeep, you may turn this creature face down".
|
||||||
effect = new VesuvanShapeshifterFaceDownEffect();
|
effect = new VesuvanShapeshifterFaceDownEffect();
|
||||||
ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, true);
|
ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, true);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
||||||
|
|
@ -616,9 +616,9 @@ public class MorphTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Linvala, Keep of Silence is preventing morph creatures from turning face up.
|
* Linvala, Keep of Silence is preventing morph creatures from turning face
|
||||||
* Turning face up is a special ability not an active ability.
|
* up. Turning face up is a special ability not an active ability. This
|
||||||
* This should not be prevented by the loss of active abilities.
|
* should not be prevented by the loss of active abilities.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testTurnFaceUpWithLinvala() {
|
public void testTurnFaceUpWithLinvala() {
|
||||||
|
|
@ -737,4 +737,45 @@ public class MorphTest extends CardTestPlayerBase {
|
||||||
assertPermanentCount(playerA, "Rattleclaw Mystic", 1);
|
assertPermanentCount(playerA, "Rattleclaw Mystic", 1);
|
||||||
assertHandCount(playerA, "Rattleclaw Mystic", 0); // should have been replayed faceup
|
assertHandCount(playerA, "Rattleclaw Mystic", 0); // should have been replayed faceup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The well-known combo with Vesuvan Shapeshifter and Brine Elemental does
|
||||||
|
* not work correctly. When Vesuvan Shapeshifter turns face up and becomes a
|
||||||
|
* copy of the targeted creature, it should still be in the state of
|
||||||
|
* "turning face up", thus triggering the ability of the Brine Elemental.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testVesuvanShapeshifter() {
|
||||||
|
|
||||||
|
// Morph {5}{U}{U}
|
||||||
|
// When Brine Elemental is turned face up, each opponent skips his or her next untap step.
|
||||||
|
addCard(Zone.HAND, playerA, "Brine Elemental"); // Creature {4}{U}{U} 5/4
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
||||||
|
|
||||||
|
// As Vesuvan Shapeshifter enters the battlefield or is turned face up, you may choose another creature on the battlefield.
|
||||||
|
// If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature
|
||||||
|
// and gains "At the beginning of your upkeep, you may turn this creature face down."
|
||||||
|
// Morph {1}{U} (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.)
|
||||||
|
addCard(Zone.HAND, playerB, "Vesuvan Shapeshifter"); // Creature 0/0
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 5);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Brine Elemental");
|
||||||
|
setChoice(playerA, "No"); // cast it normally
|
||||||
|
|
||||||
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Vesuvan Shapeshifter");
|
||||||
|
setChoice(playerB, "Yes");
|
||||||
|
setChoice(playerB, "Brine Elemental");
|
||||||
|
|
||||||
|
activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{1}{U}: Turn this face-down permanent");
|
||||||
|
|
||||||
|
setStopAt(2, PhaseStep.END_TURN);
|
||||||
|
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertPermanentCount(playerA, "Brine Elemental", 1);
|
||||||
|
|
||||||
|
assertPermanentCount(playerB, "Brine Elemental", 1);
|
||||||
|
|
||||||
|
Assert.assertTrue("Skip next turn has to be added to TurnMods", currentGame.getState().getTurnMods().size() == 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue