It is currently 16 Sep 2025, 23:16
   
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 moomarc » 11 Nov 2011, 08:09

Iran wrote:About Malfegor and Springjack Pasture? Is Possible to script them?
Exists the Remember$Discarded? Can the third abilitie of the Springjack Pasture can be script with Any parameter?

This Way:

A:AB$ Mana | Cost$ Sac<X/Creature.goat> | Produced$ Any | Amount$ ChosenX | SubAbility$ DBGainLife
SVar:DBGainLife:DB$ GainLife | Cost$ 0 | LifeAmount$ ChosenX
SVar:X:XChoice#XChosenX
I was working on Springjack Pasture this morning. Your script is close but the Produced parameter doesn't accept choice-type input, so each color has to be scripted individually. Here's the correct script:
Springjack Pasture | Open
Code: Select all
Name:Springjack Pasture
ManaCost:no cost
Types:Land
Text:no text
A:AB$ Mana | Cost$ T | Produced$ 1 | SpellDescription$ Add 1 to your mana pool.
A:AB$ Token | Cost$ 4 T | TokenAmount$ 1 | TokenName$ Goat | TokenTypes$ Creature,Goat | TokenOwner$ You | TokenColors$ White | TokenPower$ 0 | TokenToughness$ 1 | SpellDescription$ Put a 0/1 white Goat creature token onto the battlefield.
A:AB$Mana | Cost$ T Sac<X/Goat> | CostDesc$ Tap, Sacrifice X Goats: | Produced$ W | Amount$ ChosenX | Defined$ You | SubAbility$ DBGainLife | SpellDescription$ Add X W to your mana pool.
A:AB$Mana | Cost$ T Sac<X/Goat> | CostDesc$ Tap, Sacrifice X Goats: | Produced$ U | Amount$ ChosenX | Defined$ You | SubAbility$ DBGainLife | SpellDescription$ Add X U to your mana pool.
A:AB$Mana | Cost$ T Sac<X/Goat> | CostDesc$ Tap, Sacrifice X Goats: | Produced$ B | Amount$ ChosenX | Defined$ You | SubAbility$ DBGainLife | SpellDescription$ Add X B to your mana pool.
A:AB$Mana | Cost$ T Sac<X/Goat> | CostDesc$ Tap, Sacrifice X Goats: | Produced$ R | Amount$ ChosenX | Defined$ You | SubAbility$ DBGainLife | SpellDescription$ Add X R to your mana pool.
A:AB$Mana | Cost$ T Sac<X/Goat> | CostDesc$ Tap, Sacrifice X Goats: | Produced$ G | Amount$ ChosenX | Defined$ You | SubAbility$ DBGainLife | SpellDescription$ Add X G to your mana pool.
SVar:X:XChoice
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ ChosenX | SpellDescription$ You gain X life.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/springjack_pasture.jpg
End
Last edited by moomarc on 11 Nov 2011, 08:55, edited 1 time in total.
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Card Development Questions

Postby moomarc » 11 Nov 2011, 09:40

I'm trying to script Mist of Stagnation. Is it possible to make the triggered ability work? Here's what I've got but it's just not working
Code: Select all
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigUntap | TriggerDescription$ At the beginning of each player's upkeep, that player chooses a permanent for each card in his or her graveyard, then untaps those permanents.
SVar:TrigUntap:AB$ Untap | Cost$ 0 | UntapType$ Card.PlayerCtrl | Amount$ X | Defined$ TriggeredPlayer
SVar:X:Count$InYourYard
Looks like we'd need a Choose AF then UntapAll | UntapType$ Chosen
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Card Development Questions

Postby Sloth » 11 Nov 2011, 10:47

moomarc wrote:I'm trying to script Mist of Stagnation. Is it possible to make the triggered ability work? Here's what I've got but it's just not working
Code: Select all
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigUntap | TriggerDescription$ At the beginning of each player's upkeep, that player chooses a permanent for each card in his or her graveyard, then untaps those permanents.
SVar:TrigUntap:AB$ Untap | Cost$ 0 | UntapType$ Card.PlayerCtrl | Amount$ X | Defined$ TriggeredPlayer
SVar:X:Count$InYourYard
Looks like we'd need a Choose AF then UntapAll | UntapType$ Chosen
Card.PlayerCtrl does not exist, but I can't find the restriction in the oracle text anyway. So Permanent should be enough.
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 moomarc » 11 Nov 2011, 13:19

Sloth wrote:
moomarc wrote:I'm trying to script Mist of Stagnation. Is it possible to make the triggered ability work? Here's what I've got but it's just not working
Code: Select all
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigUntap | TriggerDescription$ At the beginning of each player's upkeep, that player chooses a permanent for each card in his or her graveyard, then untaps those permanents.
SVar:TrigUntap:AB$ Untap | Cost$ 0 | UntapType$ Card.PlayerCtrl | Amount$ X | Defined$ TriggeredPlayer
SVar:X:Count$InYourYard
Looks like we'd need a Choose AF then UntapAll | UntapType$ Chosen
Card.PlayerCtrl does not exist, but I can't find the restriction in the oracle text anyway. So Permanent should be enough.
I tried that as well, but no luck. I think it's because Amount is actually for use with UntapUpTo. And the .PlayerCtrl was a remnant from when I tried a different method and was limiting it to only the player's upkeep for testing. But I just saw another problem so it would have to be split anyway. At the moment both players count cards in your graveyard instead of their own. 8-[ So I still think we'd need a Choose AF then UntapAll | UntapType$ Chosen or ValidChoice$ which could be used interchangeably with ValidTgts$.

So I've gone onto another one now.
Coffin Queen | Open
Name:Coffin Queen
ManaCost:2 B
Types:Creature Zombie Wizard
Text:no text
PT:1/1
K:You may choose not to untap CARDNAME during your untap step.
A:AB$ ChangeZone | Cost$ 2 B T | Origin$ Graveyard | Destination$ Battlefield | RememberChanged$ True | GainControl$ True | TgtPrompt$ Select target creature card in a graveyard | ValidTgts$ Creature | ChangeNum$ 1 | SpellDescription$ Put target creature card from a graveyard onto the battlefield under your control. When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ Untaps | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ Always | IsPresent$ Card.Self+OwnerDoesntControl | TriggerZones$ Battlefield | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
SVar:TrigExile:DB$ChangeZone | Cost$ 0 | Defined$ Remembered | Origin$ Battlefield | Destination$ Exile | Static$ True | Execute$ DBCleanup | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/coffin_queen.jpg
End
The only problem is the change owner trigger. With this script, if the AI casts Act of Treason on my Coffin Queen which has brought a creature back from the grave, the queen stays on my side and nothing triggers. I'm also getting empty stack descriptions when one of the triggers go off.
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Card Development Questions

Postby Sloth » 11 Nov 2011, 14:49

moomarc wrote:I tried that as well, but no luck. I think it's because Amount is actually for use with UntapUpTo. And the .PlayerCtrl was a remnant from when I tried a different method and was limiting it to only the player's upkeep for testing. But I just saw another problem so it would have to be split anyway. At the moment both players count cards in your graveyard instead of their own. 8-[ So I still think we'd need a Choose AF then UntapAll | UntapType$ Chosen or ValidChoice$ which could be used interchangeably with ValidTgts$.
I will try to implement a mode similar to UntapUpTo where you chose the permanents on resolution. Maybe later this weekend.

moomarc wrote:So I've gone onto another one now.
Coffin Queen | Open
Name:Coffin Queen
ManaCost:2 B
Types:Creature Zombie Wizard
Text:no text
PT:1/1
K:You may choose not to untap CARDNAME during your untap step.
A:AB$ ChangeZone | Cost$ 2 B T | Origin$ Graveyard | Destination$ Battlefield | RememberChanged$ True | GainControl$ True | TgtPrompt$ Select target creature card in a graveyard | ValidTgts$ Creature | ChangeNum$ 1 | SpellDescription$ Put target creature card from a graveyard onto the battlefield under your control. When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ Untaps | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ Always | IsPresent$ Card.Self+OwnerDoesntControl | TriggerZones$ Battlefield | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
SVar:TrigExile:DB$ChangeZone | Cost$ 0 | Defined$ Remembered | Origin$ Battlefield | Destination$ Exile | Static$ True | Execute$ DBCleanup | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/coffin_queen.jpg
End
The only problem is the change owner trigger. With this script, if the AI casts Act of Treason on my Coffin Queen which has brought a creature back from the grave, the queen stays on my side and nothing triggers. I'm also getting empty stack descriptions when one of the triggers go off.
Card.Self+OwnerDoesntControl is way too hacky (you're opponent should be able to use the ability too). I think we need a "LooseControl" trigger to script this properly. (I think there are at least 8 cards that could use it).
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 moomarc » 11 Nov 2011, 15:05

Sloth wrote:
moomarc wrote:I tried that as well, but no luck. I think it's because Amount is actually for use with UntapUpTo. And the .PlayerCtrl was a remnant from when I tried a different method and was limiting it to only the player's upkeep for testing. But I just saw another problem so it would have to be split anyway. At the moment both players count cards in your graveyard instead of their own. 8-[ So I still think we'd need a Choose AF then UntapAll | UntapType$ Chosen or ValidChoice$ which could be used interchangeably with ValidTgts$.
I will try to implement a mode similar to UntapUpTo where you chose the permanents on resolution. Maybe later this weekend.
There's no rush, just whenever you feel like it. I'm the one tackling random cards not on the wiki because they're in my favourite expansion. :mrgreen:

Sloth wrote:
moomarc wrote:So I've gone onto another one now.
Coffin Queen | Open
Name:Coffin Queen
ManaCost:2 B
Types:Creature Zombie Wizard
Text:no text
PT:1/1
K:You may choose not to untap CARDNAME during your untap step.
A:AB$ ChangeZone | Cost$ 2 B T | Origin$ Graveyard | Destination$ Battlefield | RememberChanged$ True | GainControl$ True | TgtPrompt$ Select target creature card in a graveyard | ValidTgts$ Creature | ChangeNum$ 1 | SpellDescription$ Put target creature card from a graveyard onto the battlefield under your control. When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ Untaps | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ Always | IsPresent$ Card.Self+OwnerDoesntControl | TriggerZones$ Battlefield | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
SVar:TrigExile:DB$ChangeZone | Cost$ 0 | Defined$ Remembered | Origin$ Battlefield | Destination$ Exile | Static$ True | Execute$ DBCleanup | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/coffin_queen.jpg
End
The only problem is the change owner trigger. With this script, if the AI casts Act of Treason on my Coffin Queen which has brought a creature back from the grave, the queen stays on my side and nothing triggers. I'm also getting empty stack descriptions when one of the triggers go off.
Card.Self+OwnerDoesntControl is way too hacky (you're opponent should be able to use the ability too). I think we need a "LooseControl" trigger to script this properly. (I think there are at least 8 cards that could use it).
I actaully grabbed that from another card (can't remember which but its the only other one with that particular trigger string).
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Card Development Questions

Postby Iran » 11 Nov 2011, 17:00

Exists in forge permanent.sharetype? I' d like to know if a nonland permanent shares card type with other permanent.

Trying to script Martyr's Bond. I don´t know if it´s possible.

About Mycosynth Lattice the parts "Players may spend mana as thought it were mana of any color", and
"All cards that aren't in play, spells, and permanents are colorless".
I think is very hardcore to implement. :(
I think this not possible to implement actually. :( This is a very cool card. :)
I see Mycosynth Lattice in nice combos, especially with Martyr's Bond.

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

Re: Card Development Questions

Postby jeffwadsworth » 11 Nov 2011, 17:36

Iran wrote:Exists in forge permanent.sharetype? I' d like to know if a nonland permanent shares card type with other permanent.

Trying to script Martyr's Bond. I don´t know if it´s possible.

About Mycosynth Lattice the parts "Players may spend mana as thought it were mana of any color", and
"All cards that aren't in play, spells, and permanents are colorless".
I think is very hardcore to implement. :(
I think this not possible to implement actually. :( This is a very cool card. :)
I see Mycosynth Lattice in nice combos, especially with Martyr's Bond.

Thanks
Martyr's Bond is doable with some added code for SharesTypeWith. The Mycosynth Lattice is not because you can't stamp colors on spells yet.
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 jeffwadsworth » 11 Nov 2011, 21:46

Looking at Nature's Will. This card would need a way to limit triggers per turn. I see other cards with the same problem scripted, but we might as well get it right.
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 Iran » 12 Nov 2011, 03:11

About Sundering Titan and Myr Servitor. Anyone see any problem to script them?



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

Re: Card Development Questions

Postby jeffwadsworth » 12 Nov 2011, 12:35

Iran wrote:About Sundering Titan and Myr Servitor. Anyone see any problem to script them?



Thanks
The 2nd is doable.
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 Iran » 14 Nov 2011, 01:59

Trying to script Myr Servitor. I do this script, but I don't think it is correct :(

"Myr Servitor" | Open
Name:Myr Servitor
ManaCost:1
Types:Artifact Creature Myr
Text:no text
PT:1/1
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Card.Self | PresentZone$ Battlefield | Execute$ TrigReturn | TriggerDescription$ At the beginning of your upkeep, if Myr Survitor is on the battlefield, each player all cards named Myr Survitor from his or her graveyard to the battlefield.
SVar:TrigReturn:AB$ChangeZoneAll| Cost$ 0 | Defined$ Card.namedMyr Servitor | Origin$ Graveyard | Destination$ Battlefield
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/myr_servitor.jpg
End
Last edited by Iran on 14 Nov 2011, 02:20, edited 3 times in total.
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby friarsol » 14 Nov 2011, 02:02

It shouldn't be Card.Self in the return ability. It should be something like Card.namedMyr Servitor
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Iran » 14 Nov 2011, 02:18

friarsol wrote:It shouldn't be Card.Self in the return ability. It should be something like Card.namedMyr Servitor
I think it works, with the Card.namedMyr Servitor. Someone can add it to svn, I modified the script above.
Last edited by Iran on 14 Nov 2011, 10:34, 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 » 14 Nov 2011, 02:50

jeffwadsworth wrote:
Iran wrote:Exists in forge permanent.sharetype? I' d like to know if a nonland permanent shares card type with other permanent.

Trying to script Martyr's Bond. I don´t know if it´s possible.

About Mycosynth Lattice the parts "Players may spend mana as thought it were mana of any color", and
"All cards that aren't in play, spells, and permanents are colorless".
I think is very hardcore to implement. :(
I think this not possible to implement actually. :( This is a very cool card. :)
I see Mycosynth Lattice in nice combos, especially with Martyr's Bond.

Thanks
Martyr's Bond is doable with some added code for SharesTypeWith. The Mycosynth Lattice is not because you can't stamp colors on spells yet.
Is it difficult to add some code for SharesTypeWith?
It will be really great to have Martyr's Bond in forge.
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 46 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 46 users online :: 0 registered, 0 hidden and 46 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 46 guests

Login Form