mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
* Liliana, Heretical Healer - Fixed that she was exiled and transformed even if no longer on the battlefield as the effect resolved.
This commit is contained in:
parent
de47259a49
commit
ee738786b9
2 changed files with 35 additions and 2 deletions
|
@ -92,4 +92,36 @@ public class TransformTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The creature-Liliana and another creature was out, Languish is cast
|
||||||
|
* killing both, Liliana comes back transformed and no zombie. I'm fairly
|
||||||
|
* certain she's not supposed to come back due to her exile trigger
|
||||||
|
* shouldn't be able to exile her cos she's dead.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void LilianaHereticalHealer2() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1);
|
||||||
|
|
||||||
|
// Lifelink
|
||||||
|
// Whenever another nontoken creature you control dies, exile Liliana Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, put a 2/2 black Zombie creature token onto the battlefield.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Liliana, Heretical Healer");
|
||||||
|
|
||||||
|
// All creatures get -4/-4 until end of turn.
|
||||||
|
addCard(Zone.HAND, playerB, "Languish");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 4);
|
||||||
|
|
||||||
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Languish");
|
||||||
|
|
||||||
|
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerB, "Languish", 1);
|
||||||
|
assertPermanentCount(playerA, "Liliana, Defiant Necromancer", 0);
|
||||||
|
assertPermanentCount(playerA, "Zombie", 0);
|
||||||
|
|
||||||
|
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
||||||
|
assertGraveyardCount(playerA, "Liliana, Heretical Healer", 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.abilities.effects.common;
|
package mage.abilities.effects.common;
|
||||||
|
|
||||||
import mage.MageObject;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
@ -15,6 +14,7 @@ import mage.cards.Card;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,7 +57,8 @@ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
MageObject sourceObject = source.getSourceObjectIfItStillExists(game);
|
// Creature has to be on the battlefield to get exiled and be able to return transformed
|
||||||
|
Permanent sourceObject = game.getPermanent(source.getSourceId());
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (sourceObject != null && controller != null) {
|
if (sourceObject != null && controller != null) {
|
||||||
Card card = (Card) sourceObject;
|
Card card = (Card) sourceObject;
|
||||||
|
|
Loading…
Reference in a new issue