Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by Chris H. » 07 Feb 2011, 23:32
`friarsol wrote:No Portal cards are linked on Wizards site. I forget what the newest place we've been using is.
http://serv4.tcgimages.eu/img/cards/Portal/soul_shred.jpg
http://serv4.tcgimages.eu/img/cards/Portal/soul_shred.jpg
-
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
by friarsol » 07 Feb 2011, 23:36
Kiku is incorrect then. Targeted$ just says "Take this information from what I targeted, not from the what activated me" It will get the right number of damage, but the source will be incorrect. This is important when dealing with creatures with Protection and other similar effects.SoulStorm wrote: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...
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by lazylockie » 07 Feb 2011, 23:49
I didn't know about that source damage thing when I made Kiku. Someone needs to un-commit her and Kiku's Shadow as wellfriarsol wrote:Kiku is incorrect then. Targeted$ just says "Take this information from what I targeted, not from the what activated me" It will get the right number of damage, but the source will be incorrect. This is important when dealing with creatures with Protection and other similar effects.SoulStorm wrote: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...
- lazylockie
- Posts: 508
- Joined: 13 Jul 2010, 22:44
- Has thanked: 74 times
- Been thanked: 15 times
Re: Card Development Questions
by jeffwadsworth » 08 Feb 2011, 00:54
Is there a problem with having too many SVar variables? Or is the card script completely wrong?
- Code: Select all
Name:Noetic Scales
ManaCost:4
Types:Artifact
Text:no text
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigBounce | TriggerZones$ Battlefield | TriggerDescription$ Test Human
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Opponent | Execute$ TrigBounceAI | TriggerZones$ Battlefield | Secondary$ True | TriggerDescription$ Test AI
SVar:TrigBounce:AB$ChangeZoneAll | Cost$ 0 | Origin$ Battlefield | Destination$ Hand | ChangeType$ Creature.powerGEX | Defined$ You
SVar:TrigBounceAI:AB$ChangeZoneAll | Cost$ 0 | Origin$ Battlefield | Destination$ Hand | ChangeType$ Creature.powerGEY | Defined$ Opponent
SVar:X:Count$InYourHand
SVar:Y:Count$InOppHand
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/noetic_scales.jpg
End
Last edited by jeffwadsworth on 08 Feb 2011, 01:08, edited 1 time in total.
- 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 » 08 Feb 2011, 01:00
I would recommend having more descriptive variables than X,Y,W,V. You'd kill some of the programmers with variables like that.
However, you don't use ChangeNum with ChangeZoneAll though. ALL of them are changing zone, why would you need to count how many that is?
So you'd just have X and Y, which is probably fine.
However, you don't use ChangeNum with ChangeZoneAll though. ALL of them are changing zone, why would you need to count how many that is?
So you'd just have X and Y, which is probably fine.
- 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 » 08 Feb 2011, 01:05
@Sol, that is quite true. Yet, even the edited script in the original post still bombs.
- 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 » 08 Feb 2011, 01:26
Oh, where you have the variable that is used in hasProperty() which is a little more restrictive to what variables you use. It expects that any variable that it receives be "X"; only the AFs which can call calculateAmount() currently are flexible to handle non-X variables. So this will probably have to wait until someone changes that part of the code to act like calculateAmount
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by lazylockie » 08 Feb 2011, 23:28
Card.Multicolor restriction isn't working. When I cast Lightning Helix, it doesn't trigger the dude. If I change to Card.nonMulticolor, Lightning Helix triggers the dude's pump. Anyone confirms?Name:Gloryscale Viashino
ManaCost:1 R G W
Types:Creature Viashino Soldier
Text:no text
PT:3/3
T:Mode$ SpellCast | ValidCard$ Card.Multicolor+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you cast a multicolored spell, CARDNAME gets +3/+3 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | NumAtt$ +3 | NumDef$ +3 | Defined$ Self
SVar:BuffedBy:Card.Multicolor
SVar:Picture:http://www.wizards.com/global/images/magic/general/gloryscale_viashino.jpg
SVar:Rarity:Uncommon
SetInfo:ARB|Uncommon|http://magiccards.info/scans/en/arb/120.jpg
End
- lazylockie
- Posts: 508
- Joined: 13 Jul 2010, 22:44
- Has thanked: 74 times
- Been thanked: 15 times
Re: Card Development Questions
by friarsol » 09 Feb 2011, 02:52
Try MultiColor (I have no idea why it's listed this way)
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by lazylockie » 09 Feb 2011, 03:02
Thanks, that did the trickfriarsol wrote:Try MultiColor (I have no idea why it's listed this way)
- lazylockie
- Posts: 508
- Joined: 13 Jul 2010, 22:44
- Has thanked: 74 times
- Been thanked: 15 times
Re: Card Development Questions
by jeffwadsworth » 09 Feb 2011, 21:39
This test card isn't working. Anyone see an issue with the script?
- Code: Select all
Name:Retromancer
ManaCost:2 R R
Types:Creature Viashino Shaman
Text:no text
PT:3/3
T:Mode$ SpellAbilityCast | TargetsValid$ Card.Self | Execute$ TrigDamage | TriggerDescription$ Whenever CARDNAME becomes the target of a spell or ability, CARDNAME deals 3 damage to that spell or ability's controller.
SVar:TrigDamage:AB$DealDamage | Cost$ 0 | Defined$ TriggeredController | NumDmg$ 3
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/retromancer.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 Zirbert » 10 Feb 2011, 02:30
Do token-generating cards need a TokenImage$ parameter, or can the image be automatically determined based on the token's power / toughness / name? When I was scripting Flurry of Wings, I didn't include a TokenImage$ parameter, because I thought that the token generator I cribbed the code from didn't have one (I don't remember now which one I looked at). Now that I've looked at a lot more card scripts, I'm not so sure.
If they do need a TokenImage$ parameter, then I'd appreciate it if someone with commit status could add it to Flurry of Wings ( | TokenImage$ W 1 1 Bird Soldier |).
-Zirbert
If they do need a TokenImage$ parameter, then I'd appreciate it if someone with commit status could add it to Flurry of Wings ( | TokenImage$ W 1 1 Bird Soldier |).
-Zirbert
Re: Card Development Questions
by Chris H. » 10 Feb 2011, 02:36
Most tokens do not need the TokenImage$ parameter. There are a number of tokens that need to have different file names. The two 3/3 Wurm tokens for example. One has Deathtouch and the other has Lifelink printed on their token.
c_3_3_wurm_deathtouch.jpg
c_3_3_wurm_lifelink.jpg
c_3_3_wurm_deathtouch.jpg
c_3_3_wurm_lifelink.jpg
-
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
by Hellfish » 10 Feb 2011, 02:37
AF_Token can usually figure out the token image filename on it's own but sometimes it needs the help of the TokenImage parameter. Unless the token's have keywords, the TokenImage parameter is usually not needed.
EDIT: Yeah, what Chris said
EDIT: Yeah, what Chris said

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: Card Development Questions
by Hellfish » 10 Feb 2011, 16:49
No issue with the script, the trigger class was assuming that all SpellAbilities have Target objects. Such is not the case however. I fixed that and added the card! Thanks for the report.jeffwadsworth wrote:This test card isn't working. Anyone see an issue with the script?
- Code: Select all
Name:Retromancer
ManaCost:2 R R
Types:Creature Viashino Shaman
Text:no text
PT:3/3
T:Mode$ SpellAbilityCast | TargetsValid$ Card.Self | Execute$ TrigDamage | TriggerDescription$ Whenever CARDNAME becomes the target of a spell or ability, CARDNAME deals 3 damage to that spell or ability's controller.
SVar:TrigDamage:AB$DealDamage | Cost$ 0 | Defined$ TriggeredController | NumDmg$ 3
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/retromancer.jpg
End
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
Who is online
Users browsing this forum: No registered users and 46 guests