It is currently 26 May 2025, 00:24
   
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 » 19 Nov 2011, 08:06

moomarc wrote:
Ashling's Prerogative | Open
Name:Ashling's Prerogative
ManaCost:1 R
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseMode | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose odd or even. (Zero is even.)
SVar:ChooseMode:AB$ ChooseNumber | Cost$ 0 | Defined$ You | Min$ 0 | Max$ 1
S:Mode$ Continuous | Affected$ Creature.cmc/Mod.2EQX | AffectedZone$ Hand,Stack,Battlefield,Graveyard,Exile | AddKeyword$ Haste | Description$ Each creature with converted mana cost of the chosen value has haste.
S:Mode$ Continuous | Affected$ Creature.cmc/Mod.2NEX | AffectedZone$ Hand,Stack,Battlefield,Graveyard,Exile | AddKeyword$ CARDNAME enters the battlefield tapped. | Description$ Each creature without converted mana cost of the chosen value enters the battlefield tapped.
SVar:X:Count$ChosenNumber
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ashlings_prerogative.jpg
SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/150.jpg
Oracle:As Ashling's Prerogative enters the battlefield, choose odd or even. (Zero is even.)\nEach creature with converted mana cost of the chosen value has haste.\nEach creature without converted mana cost of the chosen value enters the battlefield tapped.
End

The math function in the affected restriction doesn't work. Is there a different syntax for an in-line function or can they only be used in xCount and Number SVars (in which case I can't see a way to make this card work)? At the moment only creatures with 0 casting cost get the first ability (regardless of chosen number), so I guess the cmc is being nullified completely with the current syntax. The other issue is that the 'CARDNAME enters the battlefield tapped' keyword isn't working. The creatures get the wording, but don't actually tap. So is it one of those that can't be added?
Ok, this should be scriptable now. The last ability can look like:
Code: Select all
S:Mode$ ETBTapped | ValidCard$ Creature.cmcM2Y | Description$ Each creature without converted mana cost of the chosen value enters the battlefield tapped.
and Y should be X+1.
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 » 19 Nov 2011, 08:48

Sloth wrote:
moomarc wrote:
Ashling's Prerogative | Open
Name:Ashling's Prerogative
ManaCost:1 R
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseMode | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose odd or even. (Zero is even.)
SVar:ChooseMode:AB$ ChooseNumber | Cost$ 0 | Defined$ You | Min$ 0 | Max$ 1
S:Mode$ Continuous | Affected$ Creature.cmc/Mod.2EQX | AffectedZone$ Hand,Stack,Battlefield,Graveyard,Exile | AddKeyword$ Haste | Description$ Each creature with converted mana cost of the chosen value has haste.
S:Mode$ Continuous | Affected$ Creature.cmc/Mod.2NEX | AffectedZone$ Hand,Stack,Battlefield,Graveyard,Exile | AddKeyword$ CARDNAME enters the battlefield tapped. | Description$ Each creature without converted mana cost of the chosen value enters the battlefield tapped.
SVar:X:Count$ChosenNumber
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ashlings_prerogative.jpg
SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/150.jpg
Oracle:As Ashling's Prerogative enters the battlefield, choose odd or even. (Zero is even.)\nEach creature with converted mana cost of the chosen value has haste.\nEach creature without converted mana cost of the chosen value enters the battlefield tapped.
End

The math function in the affected restriction doesn't work. Is there a different syntax for an in-line function or can they only be used in xCount and Number SVars (in which case I can't see a way to make this card work)? At the moment only creatures with 0 casting cost get the first ability (regardless of chosen number), so I guess the cmc is being nullified completely with the current syntax. The other issue is that the 'CARDNAME enters the battlefield tapped' keyword isn't working. The creatures get the wording, but don't actually tap. So is it one of those that can't be added?
Ok, this should be scriptable now. The last ability can look like:
Code: Select all
S:Mode$ ETBTapped | ValidCard$ Creature.cmcM2Y | Description$ Each creature without converted mana cost of the chosen value enters the battlefield tapped.
and Y should be X+1.
Thanks Sloth. When I get back home this evening I'll make the final changes. BTW, Y actually had to be Count$ChosenNumber/Plus.1/Mod.2 otherwise Y equals 2 when odd is 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 » 19 Nov 2011, 10:05

moomarc wrote:Thanks Sloth. When I get back home this evening I'll make the final changes. BTW, Y actually had to be Count$ChosenNumber/Plus.1/Mod.2 otherwise Y equals 2 when odd is chosen.
Y can be 2, because the new M2 comparator compars the left side modulo 2 with the right side modulo 2.
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 jeffwadsworth » 20 Nov 2011, 15:40

moomarc wrote:SVar:X:Number$A/Plus.B should fix the first problem.
No, but thanks for the reply. The correct form is there, it just doesn't work. Oh well.
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 Sloth » 20 Nov 2011, 16:14

jeffwadsworth wrote:
moomarc wrote:SVar:X:Number$A/Plus.B should fix the first problem.
No, but thanks for the reply. The correct form is there, it just doesn't work. Oh well.
I've just tried the normal form and it works:
| Open
Name:Ulasht, the Hate Seed
ManaCost:2 R G
Types:Legendary Creature Hellion Hydra
Text:Ulasht, the Hate Seed enters the battlefield with a +1/+1 counter on it for each other red creature you control and a +1/+1 counter on it for each other green creature you control.
PT:0/0
K:etbCounter:P1P1:X
A:AB$ Charm | Cost$ 1 SubCounter<1/P1P1> | Choices$ DBDamage,DBPutCounter | SpellDescription$ Choose one : Ulasht deals 1 damage to target creature; or put a 1/1 green Saproling creature token onto the battlefield.
SVar:DBDamage:DB$ DealDamage | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ Choose one — Ulasht deals 1 damage to target creature;
SVar:DBPutCounter:DB$ Token | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | TokenOwner$ You | SpellDescription$ or put a 1/1 green Saproling creature token onto the battlefield.
SVar:X:Count$Valid Creature.YouCtrl+Red+Other/Plus.B
SVar:B:Count$Valid Creature.YouCtrl+Green+Other
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ulasht_the_hate_seed.jpg
End


I have no clue about the charm bug though. :?:

EDIT: I think the whole AF Charm needs some fixing. I'm not sure how this is supposed to work.
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 Iran » 25 Nov 2011, 00:09

About Plague of Vermin, Lantern of Insight, Timesifter, Orim's Chant, Rakdos Riteknife, Shirei, Shizo's Caretaker, Crypt Champion and Cunning Wish.
Any of these cards are scriptabled (doable)?

I think Lantern of Insight is possible, but how can I show the top card of my library and AI's library?
I think Plague of Vermin is possible, but the problem is AI pay the life cost to put 1/1 Black Rat creature token.
I think Orim's Chant,Rakdos Riteknife and Crypt Champion is possible, but How can I do these scripts?
In case Rakdos Riteknife, Exists in forge blood counter?



I thank for the possible answers.
Forge is amazing game, the best.
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby moomarc » 25 Nov 2011, 12:24

Riku of Two Reflections | Open
Name:Riku of Two Reflections
ManaCost:2 U R G
Types:Legendary Creature Human Wizard
Text:no text
PT:2/2
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigCopySpell | TriggerDescription$ Whenever you cast an instant or sorcery spell, you may pay U R. If you do, copy that spell. You may choose new targets for the copy.
SVar:TrigCopySpell:AB$CopySpell | Cost$ U R | Defined$ TriggeredSpellAbility
T:Mode$ ChangesZone | ValidCard$ Creature.Other+nonToken+YouCtrl | Origin$ Any | Destination$ Battlefield | TriggerZones$ Battlefield | Execute$ TrigCopyCreature | OptionalDecider$ You | TriggerDescription$ Whenever another nontoken creature enters the battlefield under your control, you may pay G U. If you do, put a token that's a copy of that creature onto the battlefield.
SVar:TrigCopyCreature:AB$CopyPermanent | Cost$ G U | Defined$ TriggeredCard
SVar:Rarity:Mythic
SVar:Picture:http://www.wizards.com/global/images/magic/general/riku_of_two_reflections.jpg
SetInfo:COM|Mythic|http://magiccards.info/scans/en/cmd/220.jpg
Oracle:Whenever you cast an instant or sorcery spell, you may pay {U}{R}. If you do, copy that spell. You may choose new targets for the copy.\nWhenever another nontoken creature enters the battlefield under your control, you may pay {G}{U}. If you do, put a token that's a copy of that creature onto the battlefield.
End
Just finished testing Riku of Two Reflections and there's 2 questions I have before I commit:
- If you cast a second Riku with one in play, the second ability triggers before the legend rule is applied so you end up with a token Riku in play with the two originals in the grave. Is this correct?
- There seems to be a general problem with copySpell where only the first target is accepted/remembered. Should I commit anyway or wait until that issue has been resolved?
-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 friarsol » 25 Nov 2011, 13:47

moomarc wrote:- If you cast a second Riku with one in play, the second ability triggers before the legend rule is applied so you end up with a token Riku in play with the two originals in the grave. Is this correct?
That's right. The second Legendary creature hits the battlefield, triggers happen going on the stack. State based actions happen, putting both Legends in the graveyard. Trigger resolves putting a token of the Legendary creature into play.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby SoulStorm » 28 Nov 2011, 18:29

Attempted to code Tatsumasa, the Dragon's Fang, but ran into a problem. The token generation works fine and exiles Tatsumasa, the Dragon's Fang correctly, but when the token dies, Tatsumasa, the Dragon's Fang doesn't return from exile. Thanks for the help as always.

Code: Select all
Name:Tatsumasa, the Dragon's Fang
ManaCost:6
Types:Legendary Artifact Equipment
Text:Equipped creature gets +5/+5.
K:eqPump 3:+5/+5
A:AB$ Token | Cost$ 6 Exile<1/CARDNAME> | TokenAmount$ 1 | TokenName$ Dragon Spirit | TokenTypes$ Creature,Dragon,Spirit | TokenOwner$ You | TokenColors$ Blue | TokenPower$ 5 | TokenToughness$ 5 | TokenKeywords$ Flying | TokenTriggers$ TriggerJunior | TokenSVars$ TrigReturn| SpellDescription$ Put a 5/5 blue Dragon Spirit creature token with flying onto the battlefield. Return Tatsumasa to the battlefield under its owner's control when that token dies.
SVar:TriggerJunior:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ Return Tatsumasa to the battlefield under its owner's control when that token dies.
SVar:TrigReturn:AB$ChangeZone | Cost$ 0 | ChangeType$ Card.namedTatsumasa, the Dragon's Fang | ChangeNum$ 1 | Origin$ Exile | Destination$ Battlefield | Hidden$ True | SpellDescription$ Return Tatsumasa to the battlefield under its owner's control when that token dies.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/tatsumasa_the_dragons_fang.jpg
End
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby moomarc » 28 Nov 2011, 19:55

SoulStorm wrote:Attempted to code Tatsumasa, the Dragon's Fang, but ran into a problem. The token generation works fine and exiles Tatsumasa, the Dragon's Fang correctly, but when the token dies, Tatsumasa, the Dragon's Fang doesn't return from exile. Thanks for the help as always.

Code: Select all
Name:Tatsumasa, the Dragon's Fang
ManaCost:6
Types:Legendary Artifact Equipment
Text:Equipped creature gets +5/+5.
K:eqPump 3:+5/+5
A:AB$ Token | Cost$ 6 Exile<1/CARDNAME> | TokenAmount$ 1 | TokenName$ Dragon Spirit | TokenTypes$ Creature,Dragon,Spirit | TokenOwner$ You | TokenColors$ Blue | TokenPower$ 5 | TokenToughness$ 5 | TokenKeywords$ Flying | TokenTriggers$ TriggerJunior | TokenSVars$ TrigReturn| SpellDescription$ Put a 5/5 blue Dragon Spirit creature token with flying onto the battlefield. Return Tatsumasa to the battlefield under its owner's control when that token dies.
SVar:TriggerJunior:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ Return Tatsumasa to the battlefield under its owner's control when that token dies.
SVar:TrigReturn:AB$ChangeZone | Cost$ 0 | ChangeType$ Card.namedTatsumasa, the Dragon's Fang | ChangeNum$ 1 | Origin$ Exile | Destination$ Battlefield | Hidden$ True | SpellDescription$ Return Tatsumasa to the battlefield under its owner's control when that token dies.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/tatsumasa_the_dragons_fang.jpg
End
After TokenSVars$ TrigReturn, there's no space between TrigReturn and the pipe splitter. As far as I recall that will stop the svar from being added so will fail to trigger. I can't test it right now but hope that helps. My own attempt to do this card ended in failure because of 'remember' timing issues, so hope your's works.
-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 » 29 Nov 2011, 18:15

Is this implementation of Quillmane Baku correct?
Quillmane Baku | Open
Code: Select all
Name:Quillmane Baku
ManaCost:4 U
Types:Creature Spirit
Text:no text
PT:3/3
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigPutCounter | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, you may put a ki counter on CARDNAME.
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ KI | CounterNum$ 1
A:AB$ ChangeZone | Cost$ 1 T SubCounter<X/KI> | Origin$ Battlefield | Destination$ Hand | ValidTgts$ Creature | ChangeNum$ 1 | SpellDescription$ Return target creature with converted mana cost X or less to its owner's hand.
SVar:X:Targeted$CardManaCost
RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/quillmane_baku.jpg
SetInfo:BOK|Common|http://magiccards.info/scans/en/bok/48.jpg
Oracle:Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Quillmane Baku.\n{1}, {T}, Remove X ki counters from Quillmane Baku: Return target creature with converted mana cost X or less to its owner's hand.
End
The "target creature with converted mana cost X or less" part is based on the script for Dominate where essentially the target determines the Xcost instead of the other way around; so the target is selected first, then the counters removed afterwards (or cancelled if there aren't enough counters). It works well but you can never remove more counters than the targeted card's cmc. This is fine in most circumstances but one might decide to do that to prevent it being targeted by Hunter of Eyeblights or Razorfin Abolisher (neither of which we have though, so for now its a mute point anyway).
So should I commit?

Secondly, there was never a reply to the last question I posted about Riku of Two Reflections regarding the problems with copied spell targeting. The problem can become quite pronounced with this card because of its two abilities' interactions. Should he be committed anyway?
-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 » 29 Nov 2011, 18:37

moomarc wrote:Is this implementation of Quillmane Baku correct?
I would say it's ok. Maybe in the future we can improve this.

moomarc wrote:Secondly, there was never a reply to the last question I posted about Riku of Two Reflections regarding the problems with copied spell targeting. The problem can become quite pronounced with this card because of its two abilities' interactions. Should he be committed anyway?
Copying spells and permanents is one of the only gameplay features that i'm not involved with (protecting myself from feeling responsible for everything). :D
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 friarsol » 29 Nov 2011, 19:17

Sloth wrote:Copying spells and permanents is one of the only gameplay features that i'm not involved with (protecting myself from feeling responsible for everything). :D
A wise decision.

Marc, what's the exact scenario that this is popping up in? Just give me a way I can reproduce it with the any card scripts I need to add, and I'll try to test it sometime this week. I haven't looked at copy spell stuff, but I did due the Targeting stuff, so I might be able to see what's going on.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby moomarc » 29 Nov 2011, 20:00

friarsol wrote:
Sloth wrote:Copying spells and permanents is one of the only gameplay features that i'm not involved with (protecting myself from feeling responsible for everything). :D
A wise decision.

Marc, what's the exact scenario that this is popping up in? Just give me a way I can reproduce it with the any card scripts I need to add, and I'll try to test it sometime this week. I haven't looked at copy spell stuff, but I did due the Targeting stuff, so I might be able to see what's going on.
I can't remember exactly and can't test right now, but I know I first noticed it with casting Flicker with Riku in play. Target any creature then use Riku to copy Flicker targeting another creature. As each resolves use Riku's other ability to copy the creatures that just entered play. Both will resolve as copies of the creature first targeted by Flicker. But if you've worked on the targeting issues over the last few days then maybe its fixed already.

If not the following scenarios exist with that card combo:
- Both copies of Flicker target creatures you control: you get two tokens that are copies of the creature targeted first.
- first tgt is creature opponent controls, 2nd is your's: you get no tokens
- 1st tgt your creature, then opp creature: you get 2 tokens of your targeted creature (I seem to remember this, but it doesn't make sense because you wouldn't be able to activate Riku's creature copy until after the first one resolved, so I might be wrong)
- both copies tgt opp creatures: nothing special (iirc) because his creature copy never comes into play. :D

Thanks for looking into it. (Its a mean card with Doubling Season and Flicker)

Edit: Riku of Two Reflections script | Open
Code: Select all
Name:Riku of Two Reflections
ManaCost:2 U R G
Types:Legendary Creature Human Wizard
Text:no text
PT:2/2
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigCopySpell | TriggerDescription$ Whenever you cast an instant or sorcery spell, you may pay U R. If you do, copy that spell. You may choose new targets for the copy.
SVar:TrigCopySpell:AB$CopySpell | Cost$ U R | Defined$ TriggeredSpellAbility
T:Mode$ ChangesZone | ValidCard$ Creature.Other+nonToken+YouCtrl | Origin$ Any | Destination$ Battlefield | TriggerZones$ Battlefield | Execute$ TrigCopyCreature | OptionalDecider$ You | TriggerDescription$ Whenever another nontoken creature enters the battlefield under your control, you may pay G U. If you do, put a token that's a copy of that creature onto the battlefield.
SVar:TrigCopyCreature:AB$CopyPermanent | Cost$ G U | Defined$ TriggeredCard
SVar:Rarity:Mythic
SVar:Picture:http://www.wizards.com/global/images/magic/general/riku_of_two_reflections.jpg
SetInfo:COM|Mythic|http://magiccards.info/scans/en/cmd/220.jpg
Oracle:Whenever you cast an instant or sorcery spell, you may pay {U}{R}. If you do, copy that spell. You may choose new targets for the copy.\nWhenever another nontoken creature enters the battlefield under your control, you may pay {G}{U}. If you do, put a token that's a copy of that creature onto the battlefield.
End
-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 friarsol » 29 Nov 2011, 20:23

No I haven't coded much in Forge at all lately. Been way too busy with work and real-life stuff. I wrote the current version of the Targeting objects, but from what you describe it sounds more like something to do with the copy not grabbing the appropriate SpellAbilityStackInstance (if I had to guess)
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 43 guests


Who is online

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

Login Form