Merge branch 'npe' into 'master'

Fix NPE for UntilCommand from ReplacementEffect

See merge request core-developers/forge!5239
This commit is contained in:
Michael Kamensky
2021-08-20 07:27:49 +00:00
4 changed files with 4 additions and 4 deletions

View File

@@ -718,7 +718,7 @@ public abstract class SpellAbilityEffect {
final Game game = host.getGame();
final String duration = sa.getParam("Duration");
// in case host was LKI or still resolving
if (host.isLKI() || host.getZone().is(ZoneType.Stack)) {
if (host.isLKI() || host.getZone() == null || host.getZone().is(ZoneType.Stack)) {
host = game.getCardState(host);
}

View File

@@ -3,7 +3,7 @@ ManaCost:3 R
Types:Creature Elemental Scout
PT:2/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Other |TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ When another creature enters the battlefield, sacrifice Flame-Kin War Scout. If you do, Flame-Kin War Scout deals 4 damage to that creature.
SVar:TrigSac:AB$ DealDamage | Defined$ TriggeredCardLKICopy | NumDmg$ 4 | Cost$ Sac<1/CARDNAME> | CostMandatory$ True
SVar:TrigSac:AB$ DealDamage | Defined$ TriggeredCardLKICopy | NumDmg$ 4 | Cost$ Mandatory Sac<1/CARDNAME>
AI:RemoveDeck:All
SVar:Picture:http://www.wizards.com/global/images/magic/general/flame_kin_war_scout.jpg
Oracle:When another creature enters the battlefield, sacrifice Flame-Kin War Scout. If you do, Flame-Kin War Scout deals 4 damage to that creature.

View File

@@ -2,7 +2,7 @@ Name:Grave Peril
ManaCost:1 B
Types:Enchantment
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.nonBlack |TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ When a nonblack creature enters the battlefield, sacrifice Grave Peril. If you do, destroy that creature.
SVar:TrigSac:AB$ Destroy | Defined$ TriggeredCardLKICopy | Cost$ Sac<1/CARDNAME> | CostMandatory$ True
SVar:TrigSac:AB$ Destroy | Defined$ TriggeredCardLKICopy | Cost$ Mandatory Sac<1/CARDNAME>
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:NonStackingEffect:True
AI:RemoveDeck:Random

View File

@@ -2,5 +2,5 @@ Name:Promise of Bunrei
ManaCost:2 W
Types:Enchantment
T:Mode$ ChangesZone | ValidCard$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigSac | TriggerZones$ Battlefield | TriggerDescription$ When a creature you control dies, sacrifice CARDNAME. If you do, create four 1/1 colorless Spirit creature tokens.
SVar:TrigSac:AB$ Token | TokenAmount$ 4 | TokenScript$ c_1_1_spirit | TokenOwner$ You | LegacyImage$ c 1 1 spirit sok | Cost$ Sac<1/CARDNAME> | CostMandatory$ True
SVar:TrigSac:AB$ Token | TokenAmount$ 4 | TokenScript$ c_1_1_spirit | TokenOwner$ You | LegacyImage$ c 1 1 spirit sok | Cost$ Mandatory Sac<1/CARDNAME>
Oracle:When a creature you control dies, sacrifice Promise of Bunrei. If you do, create four 1/1 colorless Spirit creature tokens.