Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by friarsol » 20 Jan 2012, 14:12
Hey moomarc,
I just saw you committed the Sanctuaries from Apocalypse. I don't think these are right.
Let's take Ana Sanctuary for an example
Firstly, there should be only a single trigger because if you have both a blue and black permanent when it triggers the second trigger will go off. But if you lose one of those before the trigger resolves, then nothing will happen.
Second, if you only have one when it goes off, but then have two when it resolves only the original trigger will resolve.
Instead I would handle it like this:
My Condition phrases might be slightly wrong cause I'm not at the right machine.
I just saw you committed the Sanctuaries from Apocalypse. I don't think these are right.
Let's take Ana Sanctuary for an example
Firstly, there should be only a single trigger because if you have both a blue and black permanent when it triggers the second trigger will go off. But if you lose one of those before the trigger resolves, then nothing will happen.
Second, if you only have one when it goes off, but then have two when it resolves only the original trigger will resolve.
Instead I would handle it like this:
- Ana Sanctuary | Open
- T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ GE1 | Execute$ TrigPump | TriggerDescription$ At the beginning of your upkeep, if you control a blue or black permanent, target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead.
SVar:TrigPump:DB$Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | ConditionCheckSVar$ X | ConditionCompare$ EQ1 | NumAtt$ +1 | NumDef$ +1
SVar:DBPumpB:DB$Pump | Defined$ Targeted | ConditionCheckSVar$ X | ConditionCompare$ GE2 | NumAtt$ +5 | NumDef$ +5
SVar:Y:Count$Valid Permanent.Blue+YouCtrl/LimitMax.1
SVar:Z:Count$Valid Permanent.Black+YouCtrl/LimitMax.1
SVar:X:SVar$Y/Plus.Z
My Condition phrases might be slightly wrong cause I'm not at the right machine.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by moomarc » 20 Jan 2012, 14:54
@Sol: I actually tested that scenario and it was working as you described it should. I couldn't work out exactly why, but somehow it resolves the correct trigger, whichever went on the stack. There's only ever 1 trigger on the stack.
That said, your method does look better. That's what I had in mind but I don't think my mind was quite there.
That said, your method does look better. That's what I had in mind but I don't think my mind was quite there.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Development Questions
by moomarc » 20 Jan 2012, 20:32
Just committed the revised scripts. Each was tested under each scenario with numbers of valid permanents changing.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Development Questions
by friarsol » 20 Jan 2012, 20:48
Great. I don't quite have enough time to script many cards these days, but I do try to scan the scripts to make sure they look ok.moomarc wrote:Just committed the revised scripts. Each was tested under each scenario with numbers of valid permanents changing.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by moomarc » 20 Jan 2012, 20:59
And I really appreciate that. Only way I'm going to get better, and always good to know its less likely a mistake will slip through. I also committed the change to Trepanation Blade.friarsol wrote:Great. I don't quite have enough time to script many cards these days, but I do try to scan the scripts to make sure they look ok.moomarc wrote:Just committed the revised scripts. Each was tested under each scenario with numbers of valid permanents changing.

In changing the scripts for the Sanctuary cycle, I did come across some unexpected behaviour (to me at least). Why does DB$LoseLife need the Cost param? I thought all Drawbacks were costless. It just crashes without it.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Development Questions
by friarsol » 20 Jan 2012, 21:19
Hmm.. Drawbacks shouldn't need Costs. Do you know what the exact script was/what the crash was?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by moomarc » 20 Jan 2012, 21:23
I've already deleted the test deck, but just remove the cost param from Necra Sanctuary and let it trigger. You'll notice all other DB$LoseLife scripts have a cost as well.friarsol wrote:Hmm.. Drawbacks shouldn't need Costs. Do you know what the exact script was/what the crash was?
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Development Questions
by friarsol » 20 Jan 2012, 21:44
I just tried this and it didn't happen for me. Maybe there was something else going on?
Also, I see a handful of other DB$ LoseLife that don't have a Cost, including Pox and Lord of Tresserhorn.
Also, I see a handful of other DB$ LoseLife that don't have a Cost, including Pox and Lord of Tresserhorn.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by moomarc » 20 Jan 2012, 21:52
friarsol wrote:I just tried this and it didn't happen for me. Maybe there was something else going on?
Also, I see a handful of other DB$ LoseLife that don't have a Cost, including Pox and Lord of Tresserhorn.


-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Development Questions
by jeffwadsworth » 23 Jan 2012, 18:52
Looking at Spiritualize. Does anyone know if there is a way to send a player object via Animate, etc? For example, you target a creature controlled by the computer...
- | Open
- Name:Spiritualize
ManaCost:2 W
Types:Instant
Text:no text
A:SP$ Animate | Cost$ 2 W | ValidTgts$ Creature | TgtPrompt$ Select target creature | Triggers$ TrigDamage | sVars$ TrigGainLife,X | SubAbility$ DBDraw | SpellDescription$ Until end of turn, whenever target creature deals damage, you gain that much life. Draw a card.
SVar:TrigDamage:Mode$ DamageDone | ValidSource$ Card.Self | Execute$ TrigGainLife | TriggerDescription$ Whenever CARDNAME deals damage, you gain that much life.
SVar:TrigGainLife:AB$ GainLife | Cost$ 0 | LifeAmount$ X | Needs a Defined Player object
SVar:DBDraw:DB$ Draw | NumCards$ 1
SVar:X:TriggerCount$DamageAmount
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/spiritualize.jpg
End
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 23 Jan 2012, 19:01
I think I've asked this before but can you create an Effect Trigger that Remembers the Target that way the Effect is owned by You?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Sloth » 23 Jan 2012, 19:20
Yes, examples: Skeletonize and Interdict.friarsol wrote:I think I've asked this before but can you create an Effect Trigger that Remembers the Target that way the Effect is owned by You?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by moomarc » 23 Jan 2012, 19:31
Those only work because the effect is a drawback of the targeted ability. For Spiritualize the Effect would have to be targeted itself. Is that possible?Sloth wrote:Yes, examples: Skeletonize and Interdict.friarsol wrote:I think I've asked this before but can you create an Effect Trigger that Remembers the Target that way the Effect is owned by You?
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Development Questions
by friarsol » 23 Jan 2012, 19:32
Thought so.
Jeff, try it like that:
Create an effect that will trigger similarly to Skeletonize, that way the effect should just GainLife to the player who cast the original spell, and it will "watch" the Targeted Creature instead of Animating the creature.
Jeff, try it like that:
Create an effect that will trigger similarly to Skeletonize, that way the effect should just GainLife to the player who cast the original spell, and it will "watch" the Targeted Creature instead of Animating the creature.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 23 Jan 2012, 19:50
Ok. I was afraid of that. An effect for this type of card is sort of unusual.friarsol wrote:Thought so.
Jeff, try it like that:
Create an effect that will trigger similarly to Skeletonize, that way the effect should just GainLife to the player who cast the original spell, and it will "watch" the Targeted Creature instead of Animating the creature.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Who is online
Users browsing this forum: Google [Bot] and 38 guests