It is currently 25 May 2025, 17:11
   
Text Size

Card Development Questions

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Card Development Questions

Postby 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:

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

Postby 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.
-Marc
User avatar
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

Postby moomarc » 20 Jan 2012, 20:32

Just committed the revised scripts. Each was tested under each scenario with numbers of valid permanents changing.
-Marc
User avatar
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

Postby friarsol » 20 Jan 2012, 20:48

moomarc wrote:Just committed the revised scripts. Each was tested under each scenario with numbers of valid permanents changing.
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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby moomarc » 20 Jan 2012, 20:59

friarsol wrote:
moomarc wrote:Just committed the revised scripts. Each was tested under each scenario with numbers of valid permanents changing.
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.
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. :partyman:

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
User avatar
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

Postby 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

Postby moomarc » 20 Jan 2012, 21:23

friarsol wrote:Hmm.. Drawbacks shouldn't need Costs. Do you know what the exact script was/what the crash was?
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.
-Marc
User avatar
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

Postby 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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby 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.
:-k I guess it must have been something else. Not too sure what I'm remembering. Guess I'm just finally losing it! =P~
-Marc
User avatar
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

Postby 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

Postby 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

Postby Sloth » 23 Jan 2012, 19:20

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?
Yes, examples: Skeletonize and Interdict.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Development Questions

Postby moomarc » 23 Jan 2012, 19:31

Sloth wrote:
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?
Yes, examples: Skeletonize and Interdict.
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?
-Marc
User avatar
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

Postby 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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby jeffwadsworth » 23 Jan 2012, 19:50

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.
Ok. I was afraid of that. An effect for this type of card is sort of unusual.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 39 guests


Who is online

In total there are 39 users online :: 0 registered, 0 hidden and 39 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 39 guests

Login Form