It is currently 10 Jun 2025, 17:47
   
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 Jaedayr » 22 Mar 2011, 21:09

When an ability has both a positive and a negative effect, should it be coded with IsCurse$ True ? I am thinking yes but want to verify so that we are consistent in our card treatment. See the card I am working on below. Holding on commit until I get feedback.

Code: Select all
Name:Thorntooth Witch
ManaCost:5 B
Types:Creature Treefolk Shaman
Text:no text
PT:3/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Treefolk.Other+YouCtrl | OptionalDecider$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you cast a Treefolk spell, you may have target creature get +3/-3 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ 3 | NumDef$ -3 | IsCurse$ True
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/thorntooth_witch.jpg
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/144.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 Sloth » 23 Mar 2011, 09:09

Jaedayr wrote:When an ability has both a positive and a negative effect, should it be coded with IsCurse$ True ? I am thinking yes but want to verify so that we are consistent in our card treatment. See the card I am working on below. Holding on commit until I get feedback.

Code: Select all
Name:Thorntooth Witch
ManaCost:5 B
Types:Creature Treefolk Shaman
Text:no text
PT:3/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Treefolk.Other+YouCtrl | OptionalDecider$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you cast a Treefolk spell, you may have target creature get +3/-3 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ 3 | NumDef$ -3 | IsCurse$ True
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/thorntooth_witch.jpg
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/144.jpg
End
In this case isCurse$ True should be applied, so the AI will try to kill creatures.
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 Chris H. » 23 Mar 2011, 10:41

Sloth wrote:
Jaedayr wrote:When an ability has both a positive and a negative effect, should it be coded with IsCurse$ True ? I am thinking yes but want to verify so that we are consistent in our card treatment. See the card I am working on below. Holding on commit until I get feedback.

Code: Select all
Name:Thorntooth Witch
ManaCost:5 B
Types:Creature Treefolk Shaman
Text:no text
PT:3/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Treefolk.Other+YouCtrl | OptionalDecider$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you cast a Treefolk spell, you may have target creature get +3/-3 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ 3 | NumDef$ -3 | IsCurse$ True
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/thorntooth_witch.jpg
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/144.jpg
End
In this case isCurse$ True should be applied, so the AI will try to kill creatures.
`
I agree with Sloth on this one. Until the AI gets substantially improved, it would be best to use "isCurse$ True" to give the AI a chance to kill creatures with this ab.

You may want to hold off on this type of card for a different reason though... Your current trigger would go off when a Treefolk is ressurected from the graveyard. Ugh.

"Origin$ Hand" would prevent this situation. Except that it would now trigger with Elvish Piper type abs. So we would need somesort of a "isCast True" type of parameter that would be set via the casting code for these type of cards to be rules compliant.

I wonder if Hellfish has any plans for this?
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 Chris H. » 23 Mar 2011, 11:16

Wait a minute. We have a "T:Mode$ SpellCast" already in place. I see that we already have 187 cards using this type of trigger. 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 Hellfish » 23 Mar 2011, 11:22

Hah, beat me to it, Chris. :lol:

That plus the IsCurse bit and it should be good to go.
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 Chris H. » 23 Mar 2011, 11:45

Hellfish wrote:Hah, beat me to it, Chris. :lol:

That plus the IsCurse bit and it should be good to go.
`
I'm still working on my second cup of coffee. :mrgreen:
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 » 23 Mar 2011, 18:20

Thank you all for the feedback and for showing me a trigger I haven't used before.
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Card Development Questions

Postby Jaedayr » 29 Mar 2011, 19:00

This works but I am not sure this is the best way to make it work. I don't really like the idea of the SP$DealDamage activating the trigger of the same card. Any suggestions or is this how it should be done?

Code: Select all
Name:Giant's Ire
ManaCost:3 R
Types:Tribal Sorcery Giant
Text:no text
A:SP$DealDamage | Cost$ 3 R | Tgt$ TgtP | NumDmg$ 4 | SpellDescription$ CARDNAME deals 4 damage to target player.
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Opponent | IsPresent$ Giant.YouCtrl | Execute$ TrigDraw | TriggerDescription$ If you control a Giant, draw a card.
SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/giants_ire.jpg
SetInfo:LRW|Common|http://magiccards.info/scans/en/lw/170.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 Hellfish » 29 Mar 2011, 19:14

I think Sol's idea of a conditional AF would serve all cards like this well. I have no clear picture on how such an AF would look,though.

EDIT: Edited, reading through comprules.doc
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 Mar 2011, 03:11

Hellfish wrote:I think Sol's idea of a conditional AF would serve all cards like this well. I have no clear picture on how such an AF would look,though.

EDIT: Edited, reading through comprules.doc
Yea it's a bit different than other AFs. I'd think we would have something like an IsPresent parameter and PresentCompare and two additional SubAbilities based on whether the condition is true or false.

So this one would look something like

Code: Select all
A:SP$DealDamage | Cost$ 3 R | Tgt$ TgtP | NumDmg$ 4 | SubAbility$ SVar=DBCondition | SpellDescription$ Lightning Blast deals 4 damage to target player. If you control a Giant, draw a card.
SVar:DBCondition:DB$ Condition | IsPresent$ Giant.YouCtrl | PresentCompare$ GE1 | TrueCondition$ DBDraw
SVar:DBDraw:DB$ Draw | NumCards$ 1
Condition might also handle coin flips or a bunch of other things. Unfortunately my free time has dried up and I have some other things I want to do before I could even think about getting around to this.
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. » 04 Apr 2011, 17:39

We have a few cards that could be added using the generic aura keyword code. This code currntly uses the following keywords:

K:Enchant Artifact
K:Enchant Creature
K:Enchant Enchantment
K:Enchant Land
K:Enchant Wall
`
You can add " Curse" to the end of these keywords and this will tell the code that the AI should target a card controlled by the human as these curse auras have a negative impact rather than a good buff type of bonus.

Please note that the Type and the Curse portion must start with an uppercase letter. The keyword will not work if you use lowere case.

Spirit Shackle is a good example of how this is used as a curse:

Spirit Shackle card text | Open
Name:Spirit Shackle
ManaCost:B B
Types:Enchantment Aura
Text:no text
K:Enchant Creature Curse
T:Mode$ Taps | ValidCard$ Card.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever enchanted creature becomes tapped, put a -0/-2 counter on it.
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Enchanted | CounterType$ M0M2 | CounterNum$ 1
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/spirit_shackle.jpg
SetInfo:4ED|Uncommon|http://magiccards.info/scans/en/4e/47.jpg
SetInfo:LEG|Common|http://magiccards.info/scans/en/lg/31.jpg
End


I added some code to the generic aura keyword and it will now check to see if this string follows the "Enchant "{Type} part of this keyword " you control". This in turn will limit the human to targeting just his/her cards and will not let the AI cards be selected.

I was able to add a card and to convert a couple of cards for the last beat version to this new form. Some examples:

Bloodfire Infusion card text | Open
Name:Bloodfire Infusion
ManaCost:2 R
Types:Enchantment Aura
Text:no text
K:Enchant Creature you control
A:AB$ DamageAll | Cost$ R Sac<1/Card.AttachedBy> | ActivatingZone$ Battlefield | ValidCards$ Creature | NumDmg$ X | CostDesc$ R, Sacrifice enchanted creature: | ValidDescription$ each creature | SpellDescription$ CARDNAME deals damage equal to the sacrificed creature's power to each creature.
SVar:X:Sacrificed$CardPower
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/bloodfire_infusion.jpg
End


Caribou Range card text | Open
Name:Caribou Range
ManaCost:2 W W
Types:Enchantment Aura
Text:no text
K:Enchant Land you control
K:stPumpAll:Card.AttachedBy:0/0/SVar=Token:no Condition:Enchanted land has "W W, Tap: Put a 0/1 white Caribou creature token onto the battlefield."
SVar:Token:AB$Token | Cost$ W W T | TokenAmount$ 1 | TokenName$ Caribou | TokenTypes$ Creature,Caribou | TokenColors$ White | TokenPower$ 0 | TokenToughness$ 1 | TokenOwner$ You | SpellDescription$ Put a 0/1 white Caribou creature token onto the battlefield.
A:AB$ GainLife | Cost$ Sac<1/Caribou.token> | CostDesc$ Sacrifice a Caribou token: | LifeAmount$ 1 | SpellDescription$ You gain 1 life.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/caribou_range.jpg
SetInfo:5ED|Rare|http://magiccards.info/scans/en/5e/290.jpg
SetInfo:ICE|Rare|http://magiccards.info/scans/en/ia/235.jpg
End


OK, here are a few cards for people to look over, some of them might be good candidates.

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 » 10 Apr 2011, 17:53

Wall of Tombstones as shown below gets the appropriate toughness but at the end of the turn it resets back to 1. How can I get it to stay set until the next upkeep/trigger?

Code: Select all
Name:Wall of Tombstones
ManaCost:1 B
Types:Creature Wall
Text:no text
PT:0/1
K:Defender
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ At the beginning of your upkeep, CARDNAME's toughness becomes 1 plus the number of creature cards in your graveyard.
SVar:TrigPump:AB$Pump | Cost$ 0 | NumDef$ +X |
SVar:X:Count$TypeInYourYard.Creature
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/wall_of_tombstones.jpg
SetInfo:LEG|Uncommon|http://magiccards.info/scans/en/lg/43.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 » 10 Apr 2011, 19:12

You shouldn't be using a Pump you should be using the Toughness setting portion of Animate.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby eidolon » 11 Apr 2011, 12:44

Is it ok to change "Look at target player's hand" into "Target player reveals his/her hand" so that you can use
Code: Select all
A:SP$Discard | Cost$ 0 | ValidTgts$ Player | NumCards$ 0 | Mode$ RevealYouChoose
for it?
(Discard 0 does not trigger cards like Megrim)
eidolon
 
Posts: 56
Joined: 15 Sep 2009, 22:12
Location: Bavaria, Germany
Has thanked: 0 time
Been thanked: 0 time

Re: Card Development Questions

Postby Jaedayr » 11 Apr 2011, 20:02

friarsol wrote:You shouldn't be using a Pump you should be using the Toughness setting portion of Animate.
Using Animate has the same effect, the toughness is correct only during my turn and it is 1 during the AI turn.

Code: Select all
Name:Wall of Tombstones
ManaCost:1 B
Types:Creature Wall
Text:no text
PT:0/1
K:Defender
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigTough | TriggerDescription$ At the beginning of your upkeep, CARDNAME's toughness becomes 1 plus the number of creature cards in your graveyard.
SVar:TrigTough:AB$Animate | Cost$ 0 | Toughness$ X |
SVar:X:Count$TypeInYourYard.Creature/Plus.1
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/wall_of_tombstones.jpg
SetInfo:LEG|Uncommon|http://magiccards.info/scans/en/lg/43.jpg
End
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 12 guests


Who is online

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

Login Form