It is currently 04 Sep 2025, 02:38
   
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 Chris H. » 07 Feb 2011, 02:06

SoulStorm wrote:Wow! The pace of development has been astounding!
`
Agreed. One third of the cards are from the new set MBS. 8)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Card Development Questions

Postby jeffwadsworth » 07 Feb 2011, 06:47

Ill-Gotten Gains...well, this thing could possibly work if each of its steps resolved before going to the next one. Any way to do this script-wise?

Code: Select all
Name:Ill-Gotten Gains
ManaCost:2 B B
Types:Sorcery
Text:no text
A:SP$ ChangeZoneAll | Cost$ 2 B B | ChangeType$ Card | Origin$ Hand | Destination$ Graveyard | Defined$ Each | SubAbility$ SVar=DBChangeZone | SpellDescription$ Exile CARDNAME.  Each player discards his or her hand, then returns up to three cards from his or her graveyard to his or her hand.
SVar:DBChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | ValidTgts$ Card.YouCtrl | TargetMin$ 0 | TargetMax$ 3 | TgtPrompt$ Choose up to three cards from your graveyard. | SubAbility$ SVar=DBChangeZoneAI
SVar:DBChangeZoneAI:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | ChangeType$ Card.YouDontCtrl | ChangeNum$ 3 | Defined$ Opponent | SubAbility$ SVar=DBExile
SVar:DBExile:DB$ ChangeZone | Origin$ Stack | Destination$ Exile | Defined$ Card.Self
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ill_gotten_gains.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 » 07 Feb 2011, 14:12

Ill-Gotten Gains is a Discard, then a ChangeZoneAll (Or two). Did you try it that way?
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 » 07 Feb 2011, 17:10

friarsol wrote:Ill-Gotten Gains is a Discard, then a ChangeZoneAll (Or two). Did you try it that way?
A ChangeZoneAll? I do not see how that works here once the discard is done. I can not get the AI to grab up to 3 cards from its graveyard. Latest version.


Code: Select all
Name:Ill-Gotten Gains
ManaCost:2 B B
Types:Sorcery
Text:no text
A:SP$ Discard | Cost$ 2 B B | Mode$ Hand | Defined$ Each | SubAbility$ SVar=DBExile
SVar:DBExile:DB$ChangeZone | Origin$ Stack | Destination$ Exile | SubAbility$ SVar=DBChangeZoneChoose
SVar:DBChangeZoneChoose:DB$ChangeZone | Origin$ Graveyard | Destination$ Hand | TargetMin$ 0 | TargetMax$ 3 | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Card.YouCtrl | SubAbility$ SVar=DBChangeZonePC | SpellDescription$ Return up to three target cards from your graveyard to your hand.
SVar:DBChangeZonePC:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | ChangeType$ Card.YouDontCtrl | ChangeNum$ 3 | Defined$ Opponent
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ill_gotten_gains.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 » 07 Feb 2011, 17:26

jeffwadsworth wrote:
friarsol wrote:Ill-Gotten Gains is a Discard, then a ChangeZoneAll (Or two). Did you try it that way?
A ChangeZoneAll? I do not see how that works here once the discard is done. I can not get the AI to grab up to 3 cards from its graveyard. Latest version.
Sorry I meant it's a Discard not a ChangeZoneAll.

I'm pretty sure it can be done, just not 100%. The trick to Ill-Gotten Gains is that it's not Targeted and you need to use the Hidden$ True flag (which I did make a small note about) since Hidden chooses cards on Resolution, and Known targets them on casting.

Try something like this:
Code: Select all
A:SP$ Discard | Cost$ 2 B B | Mode$ Hand | Defined$ Each | SubAbility$ SVar=DBExile
SVar:DBExile:DB$ChangeZone | Origin$ Stack | Destination$ Exile | SubAbility$ SVar=DBChangeZoneChoose
SVar:DBChangeZoneChoose:DB$ChangeZone | Origin$ Graveyard | Destination$ Hand | ChangeNum$ 3 | ChangeType$ Card | SubAbility$ SVar=DBChangeZonePC | Hidden$ True
SVar:DBChangeZonePC:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | ChangeNum$ 3 | ChangeType$ Card | Defined$ Opponent | Hidden$ True
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 » 07 Feb 2011, 18:17

@Sol, that worked perfectly. I did note the Hidden$ but in my testing, it was removed while I tried different variations. Thanks. This will also help me with Curfew. Thanks.
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 Jaedayr » 07 Feb 2011, 21:25

Working on the card below and I saw various existing cards with similar effects coded in a few different ways so I am not sure if this is the latest and greatest way to code it or not. It works, but the prompt on the stack says to Target a Creature.nonBlack.

Also the Picture link does not work but I do not know where else are valid places to look if wizards.com does not have a pic.

Advice on these is appreciated before I commit it.

Code: Select all
Name:Soul Shred
ManaCost:3 B B
Types:Sorcery
Text:no text
A:SP$DealDamage | Cost$ 3 B B | ValidTgts$ Creature.nonBlack | NumDmg$ 3 | SubAbility$ SVar=DBGainLife | SpellDescription$ CARDNAME deals 3 damage to target nonblack creature. You gain 3 life.
SVar:DBGainLife:DB$GainLife | LifeAmount$ 3
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/soul_shred.jpg
SetInfo:POR|Common|http://magiccards.info/scans/en/po/35.jpg
End
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Card Development Questions

Postby friarsol » 07 Feb 2011, 21:33

"TgtPrompt$ Select target nonblack creature." gives a custom prompt instead of the default "built" target prompt that is just "Target a <ValidTgts>"

No Portal cards are linked on Wizards site. I forget what the newest place we've been using is.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Chris H. » 07 Feb 2011, 21:34

Jaedayr wrote:Working on the card below and I saw various existing cards with similar effects coded in a few different ways so I am not sure if this is the latest and greatest way to code it or not. It works, but the prompt on the stack says to Target a Creature.nonBlack.

Also the Picture link does not work but I do not know where else are valid places to look if wizards.com does not have a pic.

Advice on these is appreciated before I commit it.

Code: Select all
Name:Soul Shred
ManaCost:3 B B
Types:Sorcery
Text:no text
A:SP$DealDamage | Cost$ 3 B B | ValidTgts$ Creature.nonBlack | NumDmg$ 3 | SubAbility$ SVar=DBGainLife | SpellDescription$ CARDNAME deals 3 damage to target nonblack creature. You gain 3 life.
SVar:DBGainLife:DB$GainLife | LifeAmount$ 3
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/soul_shred.jpg
SetInfo:POR|Common|http://magiccards.info/scans/en/po/35.jpg
End
`
Try this minor edit of your card file:

Code: Select all
Name:Soul Shred
ManaCost:3 B B
Types:Sorcery
Text:no text
A:SP$DealDamage | Cost$ 3 B B | ValidTgts$ Creature.nonBlack | TgtPrompt$ Select target nonblack creature | NumDmg$ 3 | SubAbility$ SVar=DBGainLife | SpellDescription$ CARDNAME deals 3 damage to target nonblack creature. You gain 3 life.
SVar:DBGainLife:DB$GainLife | LifeAmount$ 3
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/soul_shred.jpg
SetInfo:POR|Common|http://magiccards.info/scans/en/po/35.jpg
End
`
The addition of a TgtPrompt$ may help to improve the prompting. :D
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Card Development Questions

Postby Jaedayr » 07 Feb 2011, 21:50

Thank you Sol and Chris. You are both correct, as usual! :D
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Card Development Questions

Postby SoulStorm » 07 Feb 2011, 22:55

: Vein Drinker

I'm contemplating how to code this card. Seems that one could use Spikeshot Elder as a template, then add a SubAbility to damage self.

Since the variable X is already used for SVar:X:Count$CardPower to define the damage cause by Vein Drinker, one can't use the variable X for SVar:X:Targeted$CardPower to define the damage caused to Vein Drinker. So can one use Y instead or does the code not support this?

I'm assuming the latter since I've never seen Y used, but I thought I'd ask anyway. If one can't use Y, is there another way to do this, or is it impossible to do through text alone currently?
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby friarsol » 07 Feb 2011, 23:03

I think Vein Drinker can't be done correctly until we get something that sets the DamageSource. By default it would be the card doing the damage, but in cases like this the SubAbility needs the Targeted Creature to be set as the DamageSource. Once DamageSource is written we can do most/all of these Arena-like cards properly.

To answer your quesiton about variables, you can use other variables for damage as long as there is an SVar set for that variable. X is just the most common.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby lazylockie » 07 Feb 2011, 23:07

SoulStorm wrote:: Vein Drinker

I'm contemplating how to code this card. Seems that one could use Spikeshot Elder as a template, then add a SubAbility to damage self.

Since the variable X is already used for SVar:X:Count$CardPower to define the damage cause by Vein Drinker, one can't use the variable X for SVar:X:Targeted$CardPower to define the damage caused to Vein Drinker. So can one use Y instead or does the code not support this?

I'm assuming the latter since I've never seen Y used, but I thought I'd ask anyway. If one can't use Y, is there another way to do this, or is it impossible to do through text alone currently?
You can use any variable. X, Y, Z, XMom, XDad. As long as it's clear that you use both when you call (on AB$ and on SVar)
lazylockie
 
Posts: 508
Joined: 13 Jul 2010, 22:44
Has thanked: 74 times
Been thanked: 15 times

Re: Card Development Questions

Postby SoulStorm » 07 Feb 2011, 23:19

K, thanks, let's see how this goes then.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby SoulStorm » 07 Feb 2011, 23:28

friarsol wrote:I think Vein Drinker can't be done correctly until we get something that sets the DamageSource. By default it would be the card doing the damage, but in cases like this the SubAbility needs the Targeted Creature to be set as the DamageSource. Once DamageSource is written we can do most/all of these Arena-like cards properly.

To answer your quesiton about variables, you can use other variables for damage as long as there is an SVar set for that variable. X is just the most common.
Sorry Sol, I didn't see your post until after I read Lazylockie's. I thought Targeted$CardPower set the damage source, but if I understand you correctly, Targeted$CardPower only looks at the power of the targetted card but doesn't make the targetted card the source of the damage. I noticed Kiku, Night's Flower was added so I assumed otherwise, oh well...
Last edited by SoulStorm on 07 Feb 2011, 23:32, edited 1 time in total.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 13 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 13 users online :: 0 registered, 0 hidden and 13 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 13 guests

Login Form