Page 1 of 1

TriggerAttacks and SingleTime Triggering

PostPosted: 16 Sep 2011, 13:04
by friarsol
So we had a bug report about Lightmine Field not dealing appropriate damage. Looking into it, it's basically because the phrase "Whenever one or more creatures attack" isn't scripted correctly.

The Script should be a single trigger going on the stack when any amount of creatures attack, but it currently goes on once per attacking creature.

I'd expect to see something like this as the script, where AttackersDeclared only fires once.

Code: Select all
T:Mode$ AttackersDeclared | ValidCard$ Creature | Execute$ TrigDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever one or more creatures attack, CARDNAME deals damage to each of those creatures equal to the number of attacking creatures.
SVar:TrigDamage:AB$DealDamage | Cost$ 0 | Defined$ TriggeredAttackers | NumDmg$ X
SVar:X:Count$TriggeredAttackers
There's a few other cards that would need this script:
Orim's Prayer (already scripted incorrectly)
Reveille Squad (already scripted incorrectly, and can be very broken)
Raging River (although this won't be scripted anytime soon)
Total War (this one might be doable)

We probably could move the "Attacks Alone" triggers over to this Mode, since this would only fire once, and if a player attacks with 20 creatures, the code wouldn't need to count the attackers 20 times.

Re: TriggerAttacks and SingleTime Triggering

PostPosted: 17 Sep 2011, 07:06
by Hellfish
On it like gnomes on gold!

EDIT: Alright, initial checkin done and Lightmine Field converted. I'll see about converting all other "One or more" triggers.

EDIT2: Done!