TriggerAttacks and SingleTime Triggering

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.
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.
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
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.