It is currently 08 Jun 2025, 20:25
   
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 Sloth » 29 Jun 2011, 08:30

SoulStorm wrote:
friarsol wrote:Bah. Jester's Cap used to work.
If I had a nickel for every time I've said that about a card! :D
That was my fault. I accidently changed the default chooser to Targeted when fixing Fertilid.
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 Starcrash » 29 Jun 2011, 13:15

jeffwadsworth 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 can't see the issue (sorry!) but at least I duplicated the issue :lol: 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.
Starcrash
 
Posts: 96
Joined: 30 May 2011, 18:39
Has thanked: 2 times
Been thanked: 1 time

Re: Card Development Questions

Postby Sloth » 29 Jun 2011, 19:49

Starcrash wrote:
jeffwadsworth 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 can't see the issue (sorry!) but at least I duplicated the issue :lol: 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.
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).
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 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:

| 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
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).
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

Postby Sloth » 30 Jun 2011, 14:50

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:

| 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
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).
Can anyone see where the problem is?
Devour is not an enters-the-battlefield trigger, it happens before it enters.
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 lunarul » 30 Jun 2011, 15:09

Sloth wrote:
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:

| 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
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).
Can anyone see where the problem is?
Devour is not an enters-the-battlefield trigger, it happens before it enters.
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...
lunarul
 
Posts: 3
Joined: 30 Jun 2011, 14:18
Has thanked: 0 time
Been thanked: 0 time

Re: Card Development Questions

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

Postby friarsol » 30 Jun 2011, 18:05

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

Re: Card Development Questions

Postby lunarul » 01 Jul 2011, 10:41

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?".
There are actually 5 cards that would need this:
- 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

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

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

| 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

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

Postby friarsol » 03 Jul 2011, 14:55

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.
Does the Remembering happen by the time the next Target would occur? I'm not sure if it does.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Hellfish » 03 Jul 2011, 15:01

Hmm, it happens on resolve, so that would need to be moved. :-k
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
User avatar
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

Postby friarsol » 03 Jul 2011, 15:06

Hellfish wrote:Hmm, it happens on resolve, so that would need to be moved. :-k
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)
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

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 28 guests


Who is online

In total there are 28 users online :: 0 registered, 0 hidden and 28 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 28 guests

Login Form