Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by Sloth » 29 Jun 2011, 08:30
That was my fault. I accidently changed the default chooser to Targeted when fixing Fertilid.SoulStorm wrote:If I had a nickel for every time I've said that about a card!friarsol wrote:Bah. Jester's Cap used to work.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by Starcrash » 29 Jun 2011, 13:15
I can't see the issue (sorry!) but at least I duplicated the issuejeffwadsworth wrote:Script for Teleport.
- | Open
- Name:Teleport
ManaCost:U U U
Types:Instant
Text:no text
A:SP$ Pump | Cost$ U U U | ActivationPhases$ Declare Attackers - Play Instants and Abilities | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Unblockable | SpellDescription$ Cast CARDNAME only during the declare attackers step. Target creature is unblockable this turn.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/teleport.jpg
End
This should work, but it can't be cast during that specified phase. Anyone see the issue?

Re: Card Development Questions
by Sloth » 29 Jun 2011, 19:49
What's wrong with it? I can cast it during the "Declare Attackers - Play Instants and Abilities" step (note that you only get to this step after you declared at least one attacker and pressed ok).Starcrash wrote:I can't see the issue (sorry!) but at least I duplicated the issuejeffwadsworth wrote:Script for Teleport.
- | Open
- Name:Teleport
ManaCost:U U U
Types:Instant
Text:no text
A:SP$ Pump | Cost$ U U U | ActivationPhases$ Declare Attackers - Play Instants and Abilities | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Unblockable | SpellDescription$ Cast CARDNAME only during the declare attackers step. Target creature is unblockable this turn.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/teleport.jpg
End
This should work, but it can't be cast during that specified phase. Anyone see the issue?I was going to post this same problem, before I discovered you had hit the same wall. Berserk works fine, so it's not a problem with "ActivationPhases$" in a Pump ability. I even changed the card name to see if it was specifically something coded into Teleport, but that didn't fix things either. It's just the weirdest thing. It should work but is plagued with a mystery bug.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by lunarul » 30 Jun 2011, 14:25
I'm new to Forge and have been trying all day to add Voracious Dragon. I tried everything and I just can't get it to work. The current version looks like this:
Can anyone see where the problem is?
- | Open
- Code: Select all
Name:Voracious Dragon
ManaCost:3 R R
Types:Creature Dragon
Text:no text
PT:4/4
K:Flying
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals damage to target creature or player equal to twice the number of Goblins it devoured.
SVar:TrigDealDamage:AB$DealDamage | Cost$ Sac<X/Creature> | Tgt$ TgtCP | NumDmg$ X | SubAbility$ SVar=DBPutCounter | SpellDescription$ Deal damage equal to twice the number of Goblins devoured.
SVar:DBPutCounter:DB$PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ Y | SpellDescription$ Devour 1.
SVar:X:Sacrificed$Valid Goblin/Times.2
SVar:Y:Sacrificed$Amount
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/voracious_dragon.jpg
SetInfo:CFX|Rare|http://magiccards.info/scans/en/cfx/75.jpg
SetInfo:DDG|Rare|http://magiccards.info/scans/en/ddg/56.jpg
End
Can anyone see where the problem is?
- lunarul
- Posts: 3
- Joined: 30 Jun 2011, 14:18
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Development Questions
by Sloth » 30 Jun 2011, 14:50
Devour is not an enters-the-battlefield trigger, it happens before it enters.lunarul wrote:I'm new to Forge and have been trying all day to add Voracious Dragon. I tried everything and I just can't get it to work. The current version looks like this:I can't see any problem with it, but it fails to add the counters (the Sacrificed set is lost for some reason and Y returns 0).
- | Open
- Code: Select all
Name:Voracious Dragon
ManaCost:3 R R
Types:Creature Dragon
Text:no text
PT:4/4
K:Flying
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals damage to target creature or player equal to twice the number of Goblins it devoured.
SVar:TrigDealDamage:AB$DealDamage | Cost$ Sac<X/Creature> | Tgt$ TgtCP | NumDmg$ X | SubAbility$ SVar=DBPutCounter | SpellDescription$ Deal damage equal to twice the number of Goblins devoured.
SVar:DBPutCounter:DB$PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ Y | SpellDescription$ Devour 1.
SVar:X:Sacrificed$Valid Goblin/Times.2
SVar:Y:Sacrificed$Amount
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/voracious_dragon.jpg
SetInfo:CFX|Rare|http://magiccards.info/scans/en/cfx/75.jpg
SetInfo:DDG|Rare|http://magiccards.info/scans/en/ddg/56.jpg
End
Can anyone see where the problem is?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by lunarul » 30 Jun 2011, 15:09
But it doesn't change the problem... Why is Y returning 0 instead of the correct number?Sloth wrote:Devour is not an enters-the-battlefield trigger, it happens before it enters.lunarul wrote:I'm new to Forge and have been trying all day to add Voracious Dragon. I tried everything and I just can't get it to work. The current version looks like this:I can't see any problem with it, but it fails to add the counters (the Sacrificed set is lost for some reason and Y returns 0).
- | Open
- Code: Select all
Name:Voracious Dragon
ManaCost:3 R R
Types:Creature Dragon
Text:no text
PT:4/4
K:Flying
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals damage to target creature or player equal to twice the number of Goblins it devoured.
SVar:TrigDealDamage:AB$DealDamage | Cost$ Sac<X/Creature> | Tgt$ TgtCP | NumDmg$ X | SubAbility$ SVar=DBPutCounter | SpellDescription$ Deal damage equal to twice the number of Goblins devoured.
SVar:DBPutCounter:DB$PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ Y | SpellDescription$ Devour 1.
SVar:X:Sacrificed$Valid Goblin/Times.2
SVar:Y:Sacrificed$Amount
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/voracious_dragon.jpg
SetInfo:CFX|Rare|http://magiccards.info/scans/en/cfx/75.jpg
SetInfo:DDG|Rare|http://magiccards.info/scans/en/ddg/56.jpg
End
Can anyone see where the problem is?
To have a proper devour (before entering), I'd have to use K:Devour:1, but then I wouldn't be able to search the devoured cards for Goblins...
- lunarul
- Posts: 3
- Joined: 30 Jun 2011, 14:18
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Development Questions
by Hellfish » 30 Jun 2011, 17:41
I thought about letting cards track what they've devoured in script before I realized Voracious Dragon is the only card that would use such a feature. The question then becomes "Is it worth it for that and potential custom cards and/or whenever Wizards decides to revive Devour?".
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 friarsol » 30 Jun 2011, 18:05
Either Sacrificed is being cleared out, or since it's being used on a SubAbility Sacrificed.count == 0 because the cost was paid on the Parent Ability. I'd have to look to find out, either one is possible. I'm guessing the latter to be more likely.lunarul wrote:But it doesn't change the problem... Why is Y returning 0 instead of the correct number?
To have a proper devour (before entering), I'd have to use K:Devour:1, but then I wouldn't be able to search the devoured cards for Goblins...
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by lunarul » 01 Jul 2011, 10:41
There are actually 5 cards that would need this:Hellfish wrote:I thought about letting cards track what they've devoured in script before I realized Voracious Dragon is the only card that would use such a feature. The question then becomes "Is it worth it for that and potential custom cards and/or whenever Wizards decides to revive Devour?".
- Hellkite Hatchling - check if devoured
- Marrow Chomper - need devoured count
- Skullmulcher - need devoured count
- Tar Fiend - need devoured count
- Voracious Dragon - need devoured card types
Out of these, only Skullmulcher is implemented, and that one is hard-coded.
- lunarul
- Posts: 3
- Joined: 30 Jun 2011, 14:18
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Development Questions
by Hellfish » 01 Jul 2011, 11:01
I meant that Voracious Dragon is the only card that would use a "what kinds of cards have I devoured?" feature. I'll look into this,though, 5 cards is 5 cards after all. 

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 » 01 Jul 2011, 16:39
Looking at Consume Strength.
This script does not work...I was just wondering if someone had another idea in mind.
This script does not work...I was just wondering if someone had another idea in mind.
- | Open
- Name:Consume Strength
ManaCost:1 B G
Types:Instant
Text:no text
A:SP$ Pump | Cost$ 1 B G | ValidTgts$ Creature | TgtPrompt$ Select target creature | RememberTargets$ True | ForgetOtherTargets$ True | NumAtt$ +2 | NumDef$ +2 | SubAbility$ DBPumpCurse
SVar:DBPumpCurse:DB$Pump | ValidTgts$ Creature.IsRemembered+Other | TgtPrompt$ Select a different target creature | NumAtt$ -2 | NumDef$ -2 | IsCurse$ True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/consume_strength.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 Hellfish » 03 Jul 2011, 14:53
I could add an IsNotRemembered property. That would allow Arc Trail,Leeching Bite,Consume Strength and the like to work properly with the basic idea you used there. Will edit when I've done so, I'm working on Devour-tracking right 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 friarsol » 03 Jul 2011, 14:55
Does the Remembering happen by the time the next Target would occur? I'm not sure if it does.Hellfish wrote:I could add an IsNotRemembered property. That would allow Arc Trail,Leeching Bite,Consume Strength and the like to work properly with the basic idea you used there. Will edit when I've done so, I'm working on Devour-tracking right now.
- 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 » 03 Jul 2011, 15:01
Hmm, it happens on resolve, so that would need to be moved. 

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 friarsol » 03 Jul 2011, 15:06
I think that's a bad idea. Leave it where it is. We'll think of a better way to solve this. (Target can add an extra parameter like "NotPreviouslyTargeted" that will check it's Parents targets)Hellfish wrote:Hmm, it happens on resolve, so that would need to be moved.
Edit: Lemme see if I can do that now.
- 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 35 guests