Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Adding a new card
by ArsenalNut » 28 Aug 2011, 17:24
Do you have cardsfolder.zip in the the cardsfolder directory? If so, move it somewhere else. Forge reads the cards from the zip file and ignores the directories if the zip file is there. Been there, done thatIvalen wrote:Do I need a full blown development environment to add a new card, or is it simply a matter of correctly formatting a .txt file in the cardsfolder tree?
If it's the second, then when I run Forge I cannot get it to recognize the following attempt to half-implement Searing Blaze.
- Code: Select all
Name:Searing Blaze
ManaCost:2 R
Types:Instant
Text:no text
A:SP$ DealDamage | Cost$ 2 R | Tgt$ TgtC | numDmg$ X | SubAbility$ SVar=Targetplayer | SpellDescription$ CARDNAME deals 1 damage to target creature or 3 damage to target creature if a land was played this turn.
SVar:Targetplayer | SP$ DealDamage | Cost$ 2 R | Tgt$ TgtP | numDmg$ X | SpellDescription$ CARDNAME deals 1 damage to target creature's controller or 3 damage to creature's controller if a land was played this turn.
SVar:X:Count$Landfall.3.1
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/searing_blaze.jpg
SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/90.jpg
End

You have a syntax problem with your subability. It should be
- Code: Select all
SVar:Targetplayer:DB$ DealDamage ...
There's another gotcha that I just noticed. TgtP will let you target a planeswalker which is not a valid target for the spell.
Eventually I think the snippet for the spell ability should look like
- Code: Select all
A:SP$ DealDamage | Cost$ 2 R | VaildTgts$ Player | TgtPrompt$ Choose target player | numDmg$ X | SubAbility$ SVar=TargetCreature | SpellDescription$ CARDNAME deals 1 damage to target player or 3 damage to target player if a land was played this turn.
SVar:TargetCreature:DB$ DealDamage | Cost$ 2 R | ValidTgts$ Creature.TargetedCtrl| TgtPrompt$ Choose a creature the targeted player controls | numDmg$ X | SpellDescription$ CARDNAME deals 1 damage to creature targeted player controls or 3 damage to targeted player controls if a land was played this turn.
I like the way Landfall is handled. I hadn't seen that before.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Adding a new card
by ArsenalNut » 28 Aug 2011, 18:23
It doesn't look like there's simple way to add the property because of the way targeting is handled.ArsenalNut wrote:Right now "TargetedCtrl" isn't a supported property, so you could just use "Creature" for a partially implemented card. I am going to look at what it would take to add the TargetedCtrl property.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by Ivalen » 28 Aug 2011, 21:24
Thanks for checking ArsenalNut - I'll test out the card along with the changes you stated.
It seems that for the first two cards I need I picked doozies. My second one I wanted it Staggershock, it's one of the few Rebound cards out there. I haven't found any of them to be implemented so I was wondering if it's even possible?
It seems that for the first two cards I need I picked doozies. My second one I wanted it Staggershock, it's one of the few Rebound cards out there. I haven't found any of them to be implemented so I was wondering if it's even possible?
Staggershock deals 2 damage to target creature or player.
Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
- Ivalen
- Posts: 22
- Joined: 23 Jan 2011, 15:19
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Development Questions
by ArsenalNut » 29 Aug 2011, 03:07
It's not surprising that you picked some tough ones, that's about all that's left.Ivalen wrote:It seems that for the first two cards I need I picked doozies. My second one I wanted it Staggershock, it's one of the few Rebound cards out there. I haven't found any of them to be implemented so I was wondering if it's even possible?
I tried to script rebound. I could do everything except cast the card from exile. Apparently moving a card from exile to the stack doesn't actually cast it

So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by ArsenalNut » 29 Aug 2011, 03:14
Working on Molten Sentry. I have everything working but I have a rules question before I check it in.
Molten Sentry has types Creature and Elemental but the card text only mentions Creature when talks about entering the battlefield. Does Molten Sentry keep its Elemental creature type when it enters the battlefield? I tried to find this in the comprehensive rules without luck. A pointer to a section that covers this would be appreciated.
Molten Sentry has types Creature and Elemental but the card text only mentions Creature when talks about entering the battlefield. Does Molten Sentry keep its Elemental creature type when it enters the battlefield? I tried to find this in the comprehensive rules without luck. A pointer to a section that covers this would be appreciated.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by friarsol » 29 Aug 2011, 03:18
Funnily enough, Flashback doesn't need to be hardcoded, but Rebound needs two primary additions. Checking that a Spell was cast from the hand (which doesn't really exist right now), and a Cast/Play AbilityFactory. This AF is one of the last major ones I'd think we have left, and it's a bit tricky due to some older code in this section of the engine.ArsenalNut wrote: It looks like Rebound would need to be hard coded like Flashback.
Occasionally I go through sets and try to find cards I think are Scriptable. If people have sets they'd prefer to see cards from I can do a few of those as possible Scriptables as my next few.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Hellfish » 31 Aug 2011, 18:03
A few cards off the "Not quite scriptable" list that I think are doable now.
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 jeffwadsworth » 31 Aug 2011, 19:08
If Revered Unicorn is doable, there are quite a few on that list with the same tech.Hellfish wrote:A few cards off the "Not quite scriptable" list that I think are doable now.
- 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 Hellfish » 31 Aug 2011, 19:39
I'm pretty sure it's doable.The recent LKI-related commits should see to that.
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 Iran » 02 Sep 2011, 04:07
I Tried to scripting Blowfly Infestation and Incremental Blight I make these scripts =>
Name:Blowfly Infestation
ManaCost:2 B
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.countersGE1M1M1| Execute$ TrigPutCounter | TriggerDescription$ Whenever a creature dies, if it had a -1/-1 counter on it, put a -1/-1 counter on target creature.
SVar:TrigPutCounter:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ M1M1 | CounterNum$ 1 | IsCurse$ True
End
Name:Incremental Blight
ManaCost:3 B B
Types:Sorcery
Text:no text
A:SP$ PutCounter | Cost$ 3 B B | ValidTgts$ Creature | TgtPrompt$ Select target creature (one -1/-1) | CounterType$ M1M1 | CounterNum$ 1 | IsCurse$ True | SubAbility$ SVar=DBPutCounter | SpellDescription$ Put a -1/-1 counter on target creature,
SVar:DBPutCounter:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (two -1/-1) | CounterType$ M1M1 | CounterNum$ 2 | IsCurse$ True | SubAbility$ SVar=DBPutCounter1 | SpellDescription$ two -1/-1 counters on another target creature,
SVar:DBPutCounter1:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (three -1/-1) | CounterType$ M1M1 | CounterNum$ 3 | IsCurse$ True | SpellDescription$ and three -1/-1 counters on a third creature.
End
Are these scripts correct?
thanks
Name:Blowfly Infestation
ManaCost:2 B
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.countersGE1M1M1| Execute$ TrigPutCounter | TriggerDescription$ Whenever a creature dies, if it had a -1/-1 counter on it, put a -1/-1 counter on target creature.
SVar:TrigPutCounter:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ M1M1 | CounterNum$ 1 | IsCurse$ True
End
Name:Incremental Blight
ManaCost:3 B B
Types:Sorcery
Text:no text
A:SP$ PutCounter | Cost$ 3 B B | ValidTgts$ Creature | TgtPrompt$ Select target creature (one -1/-1) | CounterType$ M1M1 | CounterNum$ 1 | IsCurse$ True | SubAbility$ SVar=DBPutCounter | SpellDescription$ Put a -1/-1 counter on target creature,
SVar:DBPutCounter:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (two -1/-1) | CounterType$ M1M1 | CounterNum$ 2 | IsCurse$ True | SubAbility$ SVar=DBPutCounter1 | SpellDescription$ two -1/-1 counters on another target creature,
SVar:DBPutCounter1:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (three -1/-1) | CounterType$ M1M1 | CounterNum$ 3 | IsCurse$ True | SpellDescription$ and three -1/-1 counters on a third creature.
End
Are these scripts correct?
thanks
Re: Card Development Questions
by Sloth » 02 Sep 2011, 06:49
Blowfly Infestation was almost correct: the trigger was missing "TriggerZones$ Battlefield" (without this it would trigger from your library). I've added it to the SVN. Thank you Iran.Iran wrote:I Tried to scripting Blowfly Infestation and Incremental Blight I make these scripts =>
Name:Blowfly Infestation
ManaCost:2 B
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.countersGE1M1M1| Execute$ TrigPutCounter | TriggerDescription$ Whenever a creature dies, if it had a -1/-1 counter on it, put a -1/-1 counter on target creature.
SVar:TrigPutCounter:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ M1M1 | CounterNum$ 1 | IsCurse$ True
End
Name:Incremental Blight
ManaCost:3 B B
Types:Sorcery
Text:no text
A:SP$ PutCounter | Cost$ 3 B B | ValidTgts$ Creature | TgtPrompt$ Select target creature (one -1/-1) | CounterType$ M1M1 | CounterNum$ 1 | IsCurse$ True | SubAbility$ SVar=DBPutCounter | SpellDescription$ Put a -1/-1 counter on target creature,
SVar:DBPutCounter:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (two -1/-1) | CounterType$ M1M1 | CounterNum$ 2 | IsCurse$ True | SubAbility$ SVar=DBPutCounter1 | SpellDescription$ two -1/-1 counters on another target creature,
SVar:DBPutCounter1:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (three -1/-1) | CounterType$ M1M1 | CounterNum$ 3 | IsCurse$ True | SpellDescription$ and three -1/-1 counters on a third creature.
End
Are these scripts correct?
thanks
Incremental Blight is not scriptable at the moment, because currently you could target the same creature again (and it's not supposed to be castable if only one target is available).
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by Iran » 02 Sep 2011, 12:58
I have some ideas to script Incremental Blight:Sloth wrote:Incremental Blight is not scriptable at the moment, because currently you could target the same creature again (and it's not supposed to be castable if only one target is available).
1) I verified if exists three or more creatures on the battlefield when the Incremental is resolve (if not exists the spell doesn't work)
2) I stored the card id of the first creature when i choose the second creature i compare: card id of the second creature is diferent of card id of the second creature and i stored the card id of the second creature, when i choose the third creature i compare: card id of the third creature is diferent of the card id of the first creature and is diferent of the card id of the second creature.
Choose the first creature (stored id)
second creature id <> first creature id (To choose the second creature) (stored id second creature)
third creature id is <> first creature id and is <> second creature id (To Choose the third creature)
Is this possible to work?
Re: Card Development Questions
by friarsol » 02 Sep 2011, 13:44
I'm pretty sure Incremental Blight needs changes in the Targeting code, not additions to the script.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by ArsenalNut » 02 Sep 2011, 14:51
I agree with Friarsol. You definitely can't use the IsRemembered property because objects are not added to the "remembered" list until the spell resolution process. I looked at adding an IsTargeted property for a similar situation. There wasn't an easy way to do it because of the way targeting is currently handled.friarsol wrote:I'm pretty sure Incremental Blight needs changes in the Targeting code, not additions to the script.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by friarsol » 02 Sep 2011, 15:08
I'll take a look at it, since Target is one of mine. Does an Issue already exist for this?ArsenalNut wrote:I agree with Friarsol. You definitely can't use the IsRemembered property because objects are not added to the "remembered" list until the spell resolution process. I looked at adding an IsTargeted property for a similar situation. There wasn't an easy way to do it because of the way targeting is currently handled.friarsol wrote:I'm pretty sure Incremental Blight needs changes in the Targeting code, not additions to the script.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Who is online
Users browsing this forum: Google [Bot] and 52 guests