BecomesTarget-triggers with target
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
3 posts
• Page 1 of 1
BecomesTarget-triggers with target
by Hellfish » 01 Jul 2011, 12:30
So I was just trying to implement Livewire Lash and it works almost right. The problem is that the spell that triggered it all is resolved before the Livewire trigger is put on the stack, which is wrong.Cowardice works properly with the BecomesTarget trigger so there must be a problem with only targeted BecomesTarget's. (Because they change input state,maybe?)
Does anybody with a bit more familiarity with the stack have any idea of what could be the cause or a general direction for me to look in?
Livewire Lash script:
Does anybody with a bit more familiarity with the stack have any idea of what could be the cause or a general direction for me to look in?
Livewire Lash script:
- Code: Select all
Name:Livewire Lash
ManaCost:2
Types:Artifact Equipment
Text:no text
K:eqPump 2:+2/+0
T:Mode$ BecomesTarget | SourceType$ Spell | ValidTarget$ Card.AttachedBy | Execute$ TrigDealDamage | TriggerDescription$ Equipped creature gets +2/+0 and has "Whenever this creature becomes the target of a spell, this creature deals 2 damage to target creature or player."
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Tgt$ TgtCP | NumDmg$ 2 | DamageSource$ Equipped
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/livewire_lash.jpg
End
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: BecomesTarget-triggers with target
by Sloth » 01 Jul 2011, 13:02
I don't want to be nit-picky, but the trigger should really be given to the creature so it will no longer work if it is later enchanted by Lignify (have we actually implemented removing triggers in stAnimate?).Hellfish wrote:So I was just trying to implement Livewire Lash and it works almost right. The problem is that the spell that triggered it all is resolved before the Livewire trigger is put on the stack, which is wrong.Cowardice works properly with the BecomesTarget trigger so there must be a problem with only targeted BecomesTarget's. (Because they change input state,maybe?)
Does anybody with a bit more familiarity with the stack have any idea of what could be the cause or a general direction for me to look in?
Livewire Lash script:
- Code: Select all
Name:Livewire Lash
ManaCost:2
Types:Artifact Equipment
Text:no text
K:eqPump 2:+2/+0
T:Mode$ BecomesTarget | SourceType$ Spell | ValidTarget$ Card.AttachedBy | Execute$ TrigDealDamage | TriggerDescription$ Equipped creature gets +2/+0 and has "Whenever this creature becomes the target of a spell, this creature deals 2 damage to target creature or player."
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Tgt$ TgtCP | NumDmg$ 2 | DamageSource$ Equipped
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/livewire_lash.jpg
End
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: BecomesTarget-triggers with target
by Hellfish » 01 Jul 2011, 13:14
Guh, I was searching Gatherer for cards where that would matter.. Must've overlooked that one.So we've got 5 cards that should be changed over to statically pumping triggers (Bear Umbra,Helm of the Ghastlord,Livewire Lash,Mephidross Vampire, Snake Umbra) once I add static trigger pumps in a moment. Giving stAnimate the ability to clear out triggers shouldn't be much of a problem. The only thing that slightly bothers me will be the amount of extra overhead registering and unregistering triggers.
EDIT: The problem with targeted BecomesTarget triggers still stands though.
EDIT: The problem with targeted BecomesTarget triggers still stands though.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 47 guests