Custom cards... Trigger problem
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Custom cards... Trigger problem
by Wadjet » 13 Oct 2011, 10:22
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).
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
by Hellfish » 13 Oct 2011, 11:01
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.
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.

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: Custom cards... Trigger problem
by Wadjet » 13 Oct 2011, 11:19
Thanks
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

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

Re: Custom cards... Trigger problem
by friarsol » 13 Oct 2011, 11:54
Wiki: http://www.slightlymagic.net/wiki/Forge_API
Also, please ask future questions here: viewtopic.php?f=52&t=3760
Also, please ask future questions here: viewtopic.php?f=52&t=3760
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 18 guests