Page 1 of 1

Custom cards... Trigger problem

PostPosted: 13 Oct 2011, 10:22
by Wadjet
I have succefully create a custom card its effects work fine but when its ability triggers, but it does four+ times :S.
Maybe is a bit confusing, I'm not great explaining things so here a screenshot screenshot.
The first ability resolve as expected (just 1 time even if it trigger 4 times).
Code: Select all
Name:Herion Talren, Elf Friend
ManaCost:2 G W
Types:Planeswalker Herion
Text:Whenever an Ally enters the battlefield under your control, put a loyalty counter on CARDNAME.
Loyalty:3
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Ally+YouCtrl | Execute$ TrigPC | TriggerDescription$ Whenever an Ally enters the battlefield under your control, put a loyalty counter on CARDNAME.
SVar:TrigPC:DB$PutCounter | Defined$ Self | CounterType$ LOYALTY | CounterNum$ 1
A:AB$ Token | Cost$ AddCounter<0/LOYALTY> | Planeswalker$ True | TokenAmount$ 1 | TokenName$ Elf Warrior Ally | TokenTypes$ Creature,Elf,Warrior,Ally | TokenOwner$ You | TokenColors$ Green,White | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green and white Elf Warrior Ally creature token into play.
A:AB$ PumpAll | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | NumDef$ +1 | KW$ Vigilance & Trample | SpellDescription$ Creatures you control gain +1/+1, vigilance and trample until the end of the turn.
A:AB$ PutCounterAll | Cost$ SubCounter<8/LOYALTY> | Planeswalker$ True | ValidCards$ Creature.YouCtrl | CounterType$ P1P1 | CounterNum$ X | SpellDescription$ Put X +1/+1 counter on each creature you control, where X is the total number of Ally creatures you control.
SVar:X:Count$Valid Creature.Ally+YouCtrl
SVar:BuffedBy:Ally
SVar:Rarity:Mythic
SVar:Picture:http://resources.wizards.com/magic/cards/lrw/en/card140212.jpg
SetInfo:CMC|Mythic|http://magiccards.info/scans/en/m11/102.jpg
Oracle:Whenever an Ally enters the battlefield under your control, put a loyalty counter on Herion Talren, Elf Friend.\n[0] Put a 1/1 green and white Elf Warrior Ally creature token into play.\n[-2] Ally creatures you control gain +1/+1, vigilance and trample until the end of the turn.\n[-8] Put X +1/+1 counter on each creature you control, where X is the total number of Ally creatures you control.
End

Re: Custom cards... Trigger problem

PostPosted: 13 Oct 2011, 11:01
by Hellfish
Did you perchance have 4 of the card in your deck?

Since the Trigger lacks a TriggerZones parameter, it will go off once for each instance of this card in the game no matter which zone they are in. To limit it to the battlefield, simply add a "TriggerZones$ Battlefield" parameter to the trigger. :)

Re: Custom cards... Trigger problem

PostPosted: 13 Oct 2011, 11:19
by Wadjet
Thanks :D that did the job, now is working as it should be xD.
There is any documentation about the cards script? Right now I'm using the cards already made as example, but it wigll be better somethin that explain a bit more :D

Re: Custom cards... Trigger problem

PostPosted: 13 Oct 2011, 11:54
by friarsol
Wiki: http://www.slightlymagic.net/wiki/Forge_API
Also, please ask future questions here: viewtopic.php?f=52&t=3760