- Fixed spell's converted mana cost when that spell contains X cost and is no longer on the stack

This commit is contained in:
swordshine
2014-05-13 04:53:40 +00:00
parent 42e1a875ed
commit 7a932e4147
11 changed files with 12 additions and 10 deletions

View File

@@ -209,5 +209,6 @@ public class TriggerSpellAbilityCast extends Trigger {
sa.setTriggeringObject("Player", this.getRunParams().get("Player"));
sa.setTriggeringObject("Activator", this.getRunParams().get("Activator"));
sa.setTriggeringObject("CurrentStormCount", this.getRunParams().get("CurrentStormCount"));
sa.setTriggeringObject("CastSACMC", this.getRunParams().get("CastSACMC"));
}
}

View File

@@ -383,6 +383,7 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
runParams.put("Player", sp.getHostCard().getController());
runParams.put("Activator", sp.getActivatingPlayer());
runParams.put("CastSA", si.getSpellAbility());
runParams.put("CastSACMC", si.getSpellAbility().getHostCard().getCMC());
runParams.put("CurrentStormCount", game.getStack().getCardsCastThisTurn().size());
game.getTriggerHandler().runTrigger(TriggerType.SpellAbilityCast, runParams, true);

View File

@@ -5,6 +5,6 @@ PT:4/4
K:Flying
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigGainLife | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, you may gain life equal to that spell's converted mana cost.
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X | References$ X
SVar:X:TriggeredCard$CardManaCost
SVar:X:TriggerCount$CastSACMC
SVar:Picture:http://www.wizards.com/global/images/magic/general/bounteous_kirin.jpg
Oracle:Flying\nWhenever you cast a Spirit or Arcane spell, you may gain life equal to that spell's converted mana cost.

View File

@@ -5,7 +5,7 @@ PT:3/3
K:Flying
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDestroyAll | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, destroy all permanents with that spell's converted mana cost.
SVar:TrigDestroyAll:AB$DestroyAll | Cost$ 0 | ValidCards$ Permanent.cmcEQX | References$ X
SVar:X:TriggeredCard$CardManaCost
SVar:X:TriggerCount$CastSACMC
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/celestial_kirin.jpg

View File

@@ -5,6 +5,6 @@ PT:4/4
K:Flying
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigMill | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, you may put the top X cards of target player's library into his or her graveyard, where X is that spell's converted mana cost.
SVar:TrigMill:AB$Mill | Cost$ 0 | ValidTgts$ Player | TgtPrompt$ Select target player | NumCards$ X | References$ X
SVar:X:TriggeredCard$CardManaCost
SVar:X:TriggerCount$CastSACMC
SVar:Picture:http://www.wizards.com/global/images/magic/general/cloudhoof_kirin.jpg
Oracle:Flying\nWhenever you cast a Spirit or Arcane spell, you may put the top X cards of target player's library into his or her graveyard, where X is that spell's converted mana cost.

View File

@@ -5,7 +5,7 @@ PT:2/2
T:Mode$ SpellCast | ValidCard$ Creature | ValidActivatingPlayer$ You | Execute$ TrigToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a creature spell, put X 1/1 black Thrull creature tokens onto the battlefield, where X is that spell's converted mana cost.
T:Mode$ Always | IsPresent$ Card.Thrull+YouCtrl | PresentCompare$ GE7 | Execute$ TrigSac | TriggerZones$ Battlefield | TriggerDescription$ When you control seven or more Thrulls, sacrifice CARDNAME.
SVar:TrigToken:AB$Token | Cost$ 0 | TokenOwner$ You | TokenAmount$ X | TokenName$ Thrull | TokenTypes$ Creature,Thrull | TokenColors$ Black | TokenPower$ 1 | TokenToughness$ 1 | References$ X
SVar:X:TriggeredCard$CardManaCost
SVar:X:TriggerCount$CastSACMC
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ Self
SVar:Picture:http://www.wizards.com/global/images/magic/general/endrek_sahr_master_breeder.jpg
Oracle:Whenever you cast a creature spell, put X 1/1 black Thrull creature tokens onto the battlefield, where X is that spell's converted mana cost.\nWhen you control seven or more Thrulls, sacrifice Endrek Sahr, Master Breeder.

View File

@@ -5,6 +5,6 @@ PT:3/3
K:Flying
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDiscard | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, target player reveals his or her hand and discards all cards with that spell's converted mana cost.
SVar:TrigDiscard:AB$Discard | Cost$ 0 | ValidTgts$ Player | Mode$ RevealDiscardAll | DiscardValid$ Card.cmcEQX | References$ X
SVar:X:TriggeredCard$CardManaCost
SVar:X:TriggerCount$CastSACMC
SVar:Picture:http://www.wizards.com/global/images/magic/general/infernal_kirin.jpg
Oracle:Flying\nWhenever you cast a Spirit or Arcane spell, target player reveals his or her hand and discards all cards with that spell's converted mana cost.

View File

@@ -4,6 +4,6 @@ Types:Legendary Creature Human Shaman
PT:5/4
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ Opponent | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ Whenever an opponent casts a spell, CARDNAME deals damage to target creature or player equal to that spell's converted mana cost.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ X | References$ X
SVar:X:TriggeredCard$CardManaCost
SVar:X:TriggerCount$CastSACMC
SVar:Picture:http://www.wizards.com/global/images/magic/general/kaervek_the_merciless.jpg
Oracle:Whenever an opponent casts a spell, Kaervek the Merciless deals damage to target creature or player equal to that spell's converted mana cost.

View File

@@ -4,7 +4,7 @@ Types:Creature Ooze
PT:1/1
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you cast a spell, CARDNAME gets +X/+X until end of turn, where X is that spell's converted mana cost.
SVar:TrigPump:AB$ Pump | Cost$ 0 | NumAtt$ +X | NumDef$ +X | References$ X
SVar:X:TriggeredCard$CardManaCost
SVar:X:TriggerCount$CastSACMC
SVar:BuffedBy:Card
SVar:Picture:http://www.wizards.com/global/images/magic/general/manaplasm.jpg
Oracle:Whenever you cast a spell, Manaplasm gets +X/+X until end of turn, where X is that spell's converted mana cost.

View File

@@ -3,7 +3,7 @@ ManaCost:4 PR
Types:Artifact
T:Mode$ SpellCast | ValidCard$ Card.CostsPhyrexianMana | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ Whenever you cast a spell with P in its mana cost, CARDNAME deals damage equal to that spell's converted mana cost to target creature or player.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ X | References$ X
SVar:X:TriggeredCard$CardManaCost
SVar:X:TriggerCount$CastSACMC
SVar:BuffedBy:Card.CostsPhyrexianMana
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/rage_extractor.jpg

View File

@@ -3,6 +3,6 @@ ManaCost:U
Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ Opponent | Execute$ TrigAnimate | TriggerZones$ Battlefield | IsPresent$ Card.Self+Enchantment | TriggerDescription$ When an opponent casts a spell, if CARDNAME is an enchantment, CARDNAME becomes an Illusion creature with power and toughness each equal to that spell's converted mana cost.
SVar:TrigAnimate:AB$ Animate | Cost$ 0 | Defined$ Self | Power$ X | Toughness$ X | Types$ Creature,Illusion | OverwriteTypes$ True | Permanent$ True
SVar:X:TriggeredCard$CardManaCost
SVar:X:TriggerCount$CastSACMC
SVar:Picture:http://www.wizards.com/global/images/magic/general/veiled_sentry.jpg
Oracle:When an opponent casts a spell, if Veiled Sentry is an enchantment, Veiled Sentry becomes an Illusion creature with power and toughness each equal to that spell's converted mana cost.