- Changed LKI zone check on a replacement effect into an optional parameter CheckLKIZone$ True. This can be used selectively on cards where not getting a replacement effect (e.g. on mass removal) can be an issue. This approach has less potential to break other things than when applied en masse.

- Added CheckLKIZone$ True to Kalitas, Traitor of Ghet.
This commit is contained in:
Agetian
2017-01-14 08:39:28 +00:00
parent 7fd0e4bcab
commit 94b409aaf0
2 changed files with 4 additions and 10 deletions

View File

@@ -112,15 +112,9 @@ public class ReplacementHandler {
for (final Card crd : p.getAllCards()) {
for (final ReplacementEffect replacementEffect : crd.getReplacementEffects()) {
// when testing ReplaceMoved effects, make sure to check last known information since the host card
// could have been moved, e.g. via a mass removal event (e.g. Kalitas, Traitor of Ghet + Wrath of God)
// TODO: currently only processing removal effects that way to avoid issues like e.g. Essence of
// the Wild destroyed in response to a creature spell going on stack still making the card ETB as a
// copy of the Essence. This probably needs some rework to allow both to function correctly without
// the need for hacks and exclusions.
boolean isReplaceMovedOnRemoval = replacementEffect instanceof ReplaceMoved && ("Graveyard".equals(replacementEffect.getMapParams().get("Destination")) || "Exile".equals(replacementEffect.getMapParams().get("Destination")));
Zone cardZone = isReplaceMovedOnRemoval ? game.getChangeZoneLKIInfo(crd).getLastKnownZone() : game.getZoneOf(crd);
// Use "CheckLKIZone" parameter to test for effects that care abut where the card was last (e.g. Kalitas, Traitor of Ghet
// getting hit by mass removal should still produce tokens).
Zone cardZone = "True".equals(replacementEffect.getMapParams().get("CheckLKIZone")) ? game.getChangeZoneLKIInfo(crd).getLastKnownZone() : game.getZoneOf(crd);
if (!replacementEffect.hasRun()
&& replacementEffect.getLayer() == layer

View File

@@ -3,7 +3,7 @@ ManaCost:2 B B
Types:Legendary Creature Vampire Warrior
PT:3/4
K:Lifelink
R:Event$ Moved | ActiveZones$ Battlefield | Origin$ Battlefield | Destination$ Graveyard | ValidLKI$ Creature.nonToken+OppCtrl | ReplaceWith$ Exile | Description$ If a nontoken creature an opponent controls would die, instead exile that card and put a 2/2 black Zombie creature token onto the battlefield.
R:Event$ Moved | ActiveZones$ Battlefield | Origin$ Battlefield | Destination$ Graveyard | ValidLKI$ Creature.nonToken+OppCtrl | ReplaceWith$ Exile | CheckLKIZone$ True | Description$ If a nontoken creature an opponent controls would die, instead exile that card and put a 2/2 black Zombie creature token onto the battlefield.
SVar:Exile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBToken | Defined$ ReplacedCard
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Zombie | TokenTypes$ Creature,Zombie | TokenColors$ Black | TokenPower$ 2 | TokenToughness$ 2 | TokenOwner$ You | TokenImage$ b 2 2 zombie OGW
A:AB$ PutCounter | Cost$ 2 B Sac<1/Vampire.Other;Zombie.Other/another Vampire or Zombie> | CounterType$ P1P1 | CounterNum$ 2 | SpellDescription$ Put two +1/+1 counters on CARDNAME.