It is currently 07 Jun 2025, 01:35
   
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 jeffwadsworth » 02 Sep 2011, 16:01

Other cards that will benefit from Sol's work on targeting are Jilt and Consume Strength.
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 ArsenalNut » 02 Sep 2011, 19:18

friarsol wrote:I'll take a look at it, since Target is one of mine. Does an Issue already exist for this?
I haven't seen one. I don't remember exactly which card I was trying to script probably something with a coin flip. I'll look at my notes when I get home and write more details. I remember the problem with adding a IsTargeted property has to do with the targeted objects being associated with the ability instance and not the host card instance so there's no list to check against in the source card.

Edit: The card I was trying to script was Incremental Growth which needs to target three unique targets.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Development Questions

Postby Iran » 02 Sep 2011, 20:33

ArsenalNut wrote: Edit: The card I was trying to script was Incremental Growth which needs to target three unique targets.
I was trying to script Incremental Blight that is the same case. Will be need alter the Targeting code?
I think friarsol make some changes about this.
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby friarsol » 02 Sep 2011, 20:49

I already made the changes. Here's the code for the new Arc Trail. The SubAbilities would just follow suit:

Code: Select all
A:SP$ DealDamage | Cost$ 1 R | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select target creature or player (2 damage) | NumDmg$ 2 | SubAbility$ SVar=DBDealDamage | SpellDescription$ CARDNAME deals 2 damage to target creature or player and 1 damage to another target creature or player.
SVar:DBDealDamage:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select target creature or player (1 damage) | TargetUnique$ True | NumDmg$ 1
The important part is to add the flag TargetUnique$ True when the Card reads "Another target" which will inform the Target Selection code to include the Parent Abilities targets as part of it's "already Targeted" list. Cards like Leeching Bite will use this, but cards like Seeds of Strength will work as they did before.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby ArsenalNut » 02 Sep 2011, 23:17

Incremental Growth worked great with the new script key. I already checked it in.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Development Questions

Postby Iran » 03 Sep 2011, 00:28

I Make the script for Incremental Blight, almost same script of the Incremental Growth.

Code: Select all
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 |
TargetUnique$ True | CounterType$ M1M1 | CounterNum$ 1 | SubAbility$ DBTwoCounters |
SpellDescription$ Put a -1/-1 counter on target creature, two -1/-1 counters on another target creature, and three -1/-1 counters on a third creature.
SVar:DBTwoCounters:DB$ PutCounter | Cost$ 0 | ValidTgts$ Creature |TgtPrompt$ Select another
target creature | TargetUnique$ True | CounterType$ M1M1 | CounterNum$ 2 |SubAbility$ DBThreeCounters
SVar:DBThreeCounters:DB$ PutCounter | Cost$ 0 | ValidTgts$ Creature |TgtPrompt$ Select a third
target creature | TargetUnique$ True | CounterType$ M1M1 | CounterNum$ 3
End
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby ArsenalNut » 03 Sep 2011, 02:02

Iran wrote:I Make the script for Incremental Blight, almost same script of the Incremental Growth.

Code: Select all
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 |
TargetUnique$ True | CounterType$ M1M1 | CounterNum$ 1 | SubAbility$ DBTwoCounters |
SpellDescription$ Put a -1/-1 counter on target creature, two -1/-1 counters on another target creature, and three -1/-1 counters on a third creature.
SVar:DBTwoCounters:DB$ PutCounter | Cost$ 0 | ValidTgts$ Creature |TgtPrompt$ Select another
target creature | TargetUnique$ True | CounterType$ M1M1 | CounterNum$ 2 |SubAbility$ DBThreeCounters
SVar:DBThreeCounters:DB$ PutCounter | Cost$ 0 | ValidTgts$ Creature |TgtPrompt$ Select a third
target creature | TargetUnique$ True | CounterType$ M1M1 | CounterNum$ 3
End
I committed Incremental Blight to the code repository. Thank you.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Development Questions

Postby friarsol » 03 Sep 2011, 16:15

Oh I just realized that the AI grabs its legal target list differently than the Human does. I'm going to go through the AFs and reuse the same function for both Players. The AI might cheat a bit when it comes to playing these cards until I'm done with that.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby ZzzzSleep » 04 Sep 2011, 06:50

Looking at Stormkirk Noble (http://www.wizards.com/Magic/Magazine/A ... ily/td/158), is there any way to script the ability "Stormkirk Noble can't be blocked by humans"?
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Card Development Questions

Postby Hellfish » 04 Sep 2011, 08:07

Yep, check out Sloth's "CantBeBlockedBy" keyword on cards like Manta Ray, Mudbrawler Raiders or Wanderbrine Rootcutters.
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 ZzzzSleep » 04 Sep 2011, 14:18

Thanks! I should have Stormkirk Noble up in a day or so...
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Card Development Questions

Postby Iran » 05 Sep 2011, 00:21

I Make the script for Innistrad card Endless Ranks of the Dead. I'm not sure is 100% correct.
Is possible to script Olivia Voldaren (card of the Innistrad Set) or is not scriptable?
The mechanism of transform in this set (Innistrad) will be dificult to implement in forge.

http://mtgsalvation.com/innistrad-spoiler.html

Code: Select all
Name:Endless Ranks of the Dead
Cost:2 B B
Types:Enchantment
Text:no text
T:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$
At the beginning of your upkeep, put X 2/2 black zombie creature tokens onto the battlefield, where X is half the number of the zombies you control, rounded down.
SVar:TrigToken:AB$Token | Cost$ 0 | TokenImage$ B 2 2 Zombie |  TokenAmount$ X | TokenName$ Zombie | TokenTypes$ Creature,Zombie | TokenOwner$ You | TokenPower$ 2 | TokenToughness$ 2 | TokenColors$ Black
SVar:X:Count$Valid Creature.zombie+YouCtrl/HalfDown
End

Last edited by Iran on 05 Sep 2011, 03:15, edited 1 time in total.
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby Iran » 05 Sep 2011, 02:04

How do works the CostChange:{params} keyword?.Which params this keyword use?. Is possible make a spell you cast cost B G W B U with this keyword?. Is possible to script Fist of Suns with this keyword?

thanks
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby slapshot5 » 05 Sep 2011, 05:49

Iran wrote:How do works the CostChange:{params} keyword?.Which params this keyword use?. Is possible make a spell you cast cost B G W B U with this keyword?. Is possible to script Fist of Suns with this keyword?

thanks
You'd want the AltCost SVar for this. Look at the script for Bringer of the Black Dawn for an example. I don't think Fist of Suns would currently be doable.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Card Development Questions

Postby Sloth » 05 Sep 2011, 06:34

Iran wrote:I Make the script for Innistrad card Endless Ranks of the Dead. I'm not sure is 100% correct.
Is possible to script Olivia Voldaren (card of the Innistrad Set) or is not scriptable?
The mechanism of transform in this set (Innistrad) will be dificult to implement in forge.

http://mtgsalvation.com/innistrad-spoiler.html

Code: Select all
Name:Endless Ranks of the Dead
Cost:2 B B
Types:Enchantment
Text:no text
T:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$
At the beginning of your upkeep, put X 2/2 black zombie creature tokens onto the battlefield, where X is half the number of the zombies you control, rounded down.
SVar:TrigToken:AB$Token | Cost$ 0 | TokenImage$ B 2 2 Zombie |  TokenAmount$ X | TokenName$ Zombie | TokenTypes$ Creature,Zombie | TokenOwner$ You | TokenPower$ 2 | TokenToughness$ 2 | TokenColors$ Black
SVar:X:Count$Valid Creature.zombie+YouCtrl/HalfDown
End

Please use this topic for Innistrad cards: viewtopic.php?f=52&t=5315

And don't forget to claim them. :D
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 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