mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Did not test the final code for Stone of Erech, when a filter was added to the ReplacementEffect :( Added an unit test, just to be safer this time around.
This commit is contained in:
parent
47456bf9c4
commit
652358a481
2 changed files with 23 additions and 0 deletions
|
|
@ -128,4 +128,26 @@ public class WouldDieExileInsteadTest extends CardTestPlayerBase {
|
|||
assertGraveyardCount(playerB, hGiant, 1);
|
||||
assertExileCount(playerB, hGiant, 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void miseryShadowReplacement() {
|
||||
// Misery's Shadow {1}{B} - 2/2 Creature
|
||||
// If a creature an opponent controls would die, exile it instead.
|
||||
// {1}: Misery’s Shadow gets +1/+1 until end of turn.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Misery's Shadow", 1);
|
||||
// Doom Blade {1}{B} - Instant
|
||||
// Destroy target non-black creature.
|
||||
addCard(Zone.HAND, playerA, "Doom Blade", 1);
|
||||
// Giant Spider - 2/4 Creature
|
||||
// Reach
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Giant Spider", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Doom Blade", "Giant Spider");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Giant Spider", 0);
|
||||
assertExileCount("Giant Spider", 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ public class CreaturesAreExiledOnDeathReplacementEffect extends ReplacementEffec
|
|||
public CreaturesAreExiledOnDeathReplacementEffect(FilterPermanent filter) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Exile);
|
||||
staticText = "If " + CardUtil.addArticle(filter.getMessage()) + " would die, exile it instead";
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
private CreaturesAreExiledOnDeathReplacementEffect(final CreaturesAreExiledOnDeathReplacementEffect effect) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue