Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by Sloth » 21 Dec 2011, 14:27
Both triggers can be stifled.moomarc wrote:A quick general question: With delayed triggers should the either the initial trigger or delayed trigger be static so that it can't be Stifle -ed or should you be able to counter both triggers?
Commit it, because that is exactly what should be happening.moomarc wrote:Part of the reason I want to know is that I've scripted Teferi's Veil. Only issue is that your attacking creatures phase out one at a time instead of all simultaneously (which isn't a problem if the delayed trigger is static). Should I commit like this or wait for PhasesAll to be implemented?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by SoulStorm » 31 Dec 2011, 12:34
. Earwig Squad
This card works fine except the exile ability operates whether or not the prowl cost was paid. I tried using Activation$ ProwlGoblin and Activation$ Prowl under both the trigger and the SVar:TrigProwl but neither helped. Any thoughts?
This card works fine except the exile ability operates whether or not the prowl cost was paid. I tried using Activation$ ProwlGoblin and Activation$ Prowl under both the trigger and the SVar:TrigProwl but neither helped. Any thoughts?
- Code: Select all
Name:Earwig Squad
ManaCost:3 B B
Types:Creature Goblin Rogue
Text:no text
PT:5/3
SVar:AltCost:Cost$ 2 B | Activation$ ProwlGoblin | Description$ Prowl 2 B (You may cast this for its prowl cost if you dealt combat damage to a player this turn with a Goblin or Rogue.)
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigProwl | TriggerDescription$ When CARDNAME enters the battlefield, if its prowl cost was paid, search target opponent's library for three cards and exile them. Then that player shuffled his or her libray.
SVar:TrigProwl:AB$ ChangeZone | Activation$ ProwlGoblin | Cost$ 0 | Origin$ Library | Destination$ Exile | ValidTgts$ Opponent | ChangeType$ Card | ChangeNum$ 3 | IsCurse$ True | Chooser$ You | Shuffle$ True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/earwig_squad.jpg
End
Re: Card Development Questions
by squee1968 » 02 Jan 2012, 21:21
Using Furnace Dragon as a template, I've scripted 4 cards that have the "if you played it from your hand," ability.
- Code: Select all
Name:Coal Stoker
ManaCost:3 R
Types:Creature Elemental
Text:no text
PT:3/3
T:Mode$ ChangesZone | Origin$ Stack | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigMana | TriggerDescription$ When CARDNAME enters the battlefield, add RRR to your mana pool.
SVar:TrigMana:AB$Mana | Cost$ 0 | Produced$ R | Amount$ 3
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/coal_stoker.jpg
SetInfo:TSP|Common|http://magiccards.info/scans/ts/en/150.jpg
Oracle:When Coal Stoker enters the battlefield, if you cast it from your hand, add {R}{R}{R} to your mana pool.
End
- Code: Select all
Name:Dread Cacodemon
ManaCost:7 B B B
Types:Creature Demon
Text:no text
PT:8/8
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Stack | Destination$ Battlefield | Execute$ TrigDestroy | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it from your hand, destroy all creatures your opponents control, then tap all other creatures you control.
SVar:TrigDestroy:AB$ DestroyAll | Cost$ 0 | ValidCards$ Creature.YouDontCtrl | SubAbility$ ABTapAll
SVar:ABTapAll:AB$TapAll | Cost$ 0 | ValidCards$ Creature.YouCtrl.Other
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/dread_cacodemon.jpg
SetInfo:CMD|Rare|http://magiccards.info/scans/cmd/en/79.jpg
Oracle:When Dread Cacodemon enters the battlefield, if you cast it from your hand, destroy all creatures your opponents control, then tap all other creatures you control.
End
- Code: Select all
Name:Reiver Demon
ManaCost:4 B B B B
Types:Creature Demon
Text:no text
PT:6/6
K:Flying
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Stack | Destination$ Battlefield | Execute$ TrigDestroyAll | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it from your hand, destroy all nonartifact, nonblack creatures. They can’t be regenerated.
SVar:TrigDestroyAll:AB$DestroyAll | Cost$ 0 | ValidCards$ Creature.nonArtifact+nonBlack | NoRegen$ True
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/reiver_demon.jpg
SetInfo:CMD|Rare|http://magiccards.info/scans/cmd/en/95.jpg
Oracle:Flying\nWhen Reiver Demon enters the battlefield, if you cast it from your hand, destroy all nonartifact, nonblack creatures. They can’t be regenerated.
End
- Code: Select all
Name:Hypnox
ManaCost:8 B B B
Types:Creature Nightmare Horror
Text:no text
PT:8/8
K:Flying
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Stack | Destination$ Battlefield | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it from your hand, exile all cards from target opponent’s hand.
SVar:TrigExile:AB$ChangeZoneAll | Cost$ 0 | ChangeType$ Card | Origin$ Hand.Opponent | Destination$ Exile | RememberTargets$ True | ForgetOtherTargets$ True
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Any | Execute$ TrigReturn | TriggerDescription$ When CARDNAME leaves the battlefield, return the exiled cards to their owner's hand.
SVar:TrigReturn:AB$ChangeZoneAll | Cost$ 0 | ChangeType$ Card | Origin$ Exile | Destination$ Hand.Opponent | Defined$ Remembered
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/hypnox.jpg
SetInfo:TOR|Rare|http://magiccards.info/scans/tr/en/64.jpg
Oracle:Flying\nWhen Hypnox enters the battlefield, if you cast it from your hand, exile all cards from target opponent’s hand.\nWhen Hypnox leaves the battlefield, return the exiled cards to their owner’s hand.
End
Re: Card Development Questions
by moomarc » 02 Jan 2012, 21:56
@squee1968: Those cards look good. Thanks. In Dread Cacodemon though the ABTapAll Svar restriction should be Creature.YouCtrl+Other (each restriction after ther first gets a "+" instead of ".")
For the last card there's a few tips to remember. When using changeZone etc the ValidCards field will define which player's hand or graveyard the cards move from. So in this case you'd simply use Origin$ Hand | ChangeType$ Card.YouDontCtrl and same for Destination on the second trigger. This is because you can never have a card that you control in your opponent's hand or graveyard and visa versa.
Also with this script you'd use RememberChanged, not RememberTargets. I'm guessing that was copied from a ChangeZone script instead of ChangeZoneAll.
Hope those help. I'll go through them more thoroughly tomorrow morning and test and commit (if no-one else has yet).
For the last card there's a few tips to remember. When using changeZone etc the ValidCards field will define which player's hand or graveyard the cards move from. So in this case you'd simply use Origin$ Hand | ChangeType$ Card.YouDontCtrl and same for Destination on the second trigger. This is because you can never have a card that you control in your opponent's hand or graveyard and visa versa.
Also with this script you'd use RememberChanged, not RememberTargets. I'm guessing that was copied from a ChangeZone script instead of ChangeZoneAll.
Hope those help. I'll go through them more thoroughly tomorrow morning and test and commit (if no-one else has yet).
-Marc
-
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
by squee1968 » 02 Jan 2012, 23:38
Thanks alot for the tips, I'll try to keep them in mind for the future. My script for Hypnox was copied almost completely from Wormfang Behemoth, so I assumed it was correct. I'm sort of understanding the difference, but not completely.moomarc wrote:@squee1968: Those cards look good. Thanks. In Dread Cacodemon though the ABTapAll Svar restriction should be Creature.YouCtrl+Other (each restriction after ther first gets a "+" instead of ".")
For the last card there's a few tips to remember. When using changeZone etc the ValidCards field will define which player's hand or graveyard the cards move from. So in this case you'd simply use Origin$ Hand | ChangeType$ Card.YouDontCtrl and same for Destination on the second trigger. This is because you can never have a card that you control in your opponent's hand or graveyard and visa versa.
Also with this script you'd use RememberChanged, not RememberTargets. I'm guessing that was copied from a ChangeZone script instead of ChangeZoneAll.
Hope those help. I'll go through them more thoroughly tomorrow morning and test and commit (if no-one else has yet).
- Code: Select all
Name:Wormfang Behemoth
ManaCost:3 U U
Types:Creature Nightmare Fish Beast
Text:no text
PT:5/5
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile all cards from your hand.
SVar:TrigExile:AB$ChangeZoneAll | Cost$ 0 | ChangeType$ Card | Origin$ Hand | Destination$ Exile | RememberTargets$ True | ForgetOtherTargets$ True
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Any | Execute$ TrigReturn | TriggerDescription$ When CARDNAME leaves the battlefield, return the exiled cards to their owner's hand.
SVar:TrigReturn:AB$ChangeZoneAll | Cost$ 0 | ChangeType$ Card | Origin$ Exile | Destination$ Hand | Defined$ Remembered
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/wormfang_behemoth.jpg
SetInfo:JUD|Rare|http://magiccards.info/scans/en/ju/55.jpg
Oracle:When Wormfang Behemoth enters the battlefield, exile all cards from your hand.\nWhen Wormfang Behemoth leaves the battlefield, return the exiled cards to their owner's hand.
End
Re: Card Development Questions
by Sloth » 03 Jan 2012, 09:34
Even though i think it's ok to add them, i want to point out that the script is not 100% correct. The trigger will trigger even when the creature was cast from the graveyard or the exile zone. I will try to add these checks later.squee1968 wrote:Using Furnace Dragon as a template, I've scripted 4 cards that have the "if you played it from your hand," ability.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by moomarc » 03 Jan 2012, 09:54
I was going to post the cards Squee1968 posted with a few minor fixes but in testing has pointed out a few other problems.
Firstly, it turns out that the "if CARDNAME was cast from your hand" bit was never implemented in Furnace Dragon in the first place so none of these implement it either. I remember avoiding these cards in the first place because I couldn't see how the trigger was limiting it just by having the stack as origin seeing that all card end up on the stack when cast from anywhere. So I haven't added any of these yet (however, I did fix up the Remember on Wormfang Behemoth, so thanks for pointing it out, Squee)
Secondly, there proved to be some errors in the cards I was using to test the situation (the only card that helped successfully test was Temporal Aperture):
- Jhoira of the Ghitu is exiling the card from your hand without giving it suspend
- When I used Horde of Notions to try cast Coal Stoker I just got a crash, but I think I recall there being other reports of this when using HoN's ability.
EDIT: I haven't tested Furnace Dragon itself, just the cards templated from it, but I don't see any hardcoded bits or script that would make it any different.
Firstly, it turns out that the "if CARDNAME was cast from your hand" bit was never implemented in Furnace Dragon in the first place so none of these implement it either. I remember avoiding these cards in the first place because I couldn't see how the trigger was limiting it just by having the stack as origin seeing that all card end up on the stack when cast from anywhere. So I haven't added any of these yet (however, I did fix up the Remember on Wormfang Behemoth, so thanks for pointing it out, Squee)
Secondly, there proved to be some errors in the cards I was using to test the situation (the only card that helped successfully test was Temporal Aperture):
- Jhoira of the Ghitu is exiling the card from your hand without giving it suspend

- When I used Horde of Notions to try cast Coal Stoker I just got a crash, but I think I recall there being other reports of this when using HoN's ability.
EDIT: I haven't tested Furnace Dragon itself, just the cards templated from it, but I don't see any hardcoded bits or script that would make it any different.
-Marc
-
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
by moomarc » 03 Jan 2012, 10:35
Just saw this now, so before you set to work on hardcoding the checks just see if you're happy with the pseudo check I scripted for them.Sloth wrote:Even though i think it's ok to add them, i want to point out that the script is not 100% correct. The trigger will trigger even when the creature was cast from the graveyard or the exile zone. I will try to add these checks later.squee1968 wrote:Using Furnace Dragon as a template, I've scripted 4 cards that have the "if you played it from your hand," ability.
- Code: Select all
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Hand | Destination$ Stack | Static$ True | DelayedTrigger$ CastFromHand
SVar:CastFromHand:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Stack | Destination$ Battlefield...etc
So should I commit them with this solution (I've tested with the previous sertup I used and they work as expected), or should I commit the base script and let you code the cast from hand check?
-Marc
-
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
by Hellfish » 03 Jan 2012, 10:38
I don't think the lack of a trigger going off if the card is cast from somewhere other than the hand is a problem, since "if you cast it from your hand" is an intervening if that, if not satisfied, does indeed cause the trigger to never go off.
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
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
-
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
by moomarc » 03 Jan 2012, 10:43
Thanks Hellfish. Can you see any other potential issues with my solution? I'm not clued up on the workings of delayed triggers so I might have missed some corner cases. Maybe the spell being countered then returning to the battlefield at a later stage? If anyone can see a problem or has a particular situation I should test let me know. Otherwise I'll commit them with this later today.Hellfish wrote:I don't think the lack of a trigger going off if the card is cast from somewhere other than the hand is a problem, since "if you cast it from your hand" is an intervening if that, if not satisfied, does indeed cause the trigger to never go off.
Edit: Tested that particular scenario and definitely not a problem.
-Marc
-
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
by friarsol » 03 Jan 2012, 13:12
Does the trigger still happen if you start casting it, and then cancel out?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by SoulStorm » 03 Jan 2012, 14:41
Is Consuming Vapors scriptable? I've tried a few way of scripting it using Tribute to Hunger as a template, but nothing seems to work right. Are rebound cards just not scriptable at his point?
Re: Card Development Questions
by moomarc » 03 Jan 2012, 14:46
As a keyword, rebound isn't available for scripting yet. I was going to try some with the method I used above if the other devs were happy with the method, but I don't know if we can do the "as it resolves" part.SoulStorm wrote:Is Consuming Vapors scriptable? I've tried a few way of scripting it using Tribute to Hunger as a template, but nothing seems to work right. Are rebound cards just not scriptable at his point?
-Marc
-
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
by moomarc » 03 Jan 2012, 15:00
I just tried and it doesn't cause any issues that I can see. In the test I select Dread Cacodemon and pay part of its cost then cancel. Then I use Elvish Piper to put him on the battlefield and the trigger is correctly suppressed (although that might be because it bypasses the stack when using the Piper? I can't think of any card that would put it on the stack first before it enters play, but if anyone can, please let me know. That would probably be the shortfall of this method). I think the hand->stack trigger being static bypasses most issues.friarsol wrote:Does the trigger still happen if you start casting it, and then cancel out?
I think I'll post them for now because either way its a step closer than they were, then you can test further scenarios you might think of.
-Marc
-
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
by SoulStorm » 03 Jan 2012, 15:05
Thanks for the data. I'm looking forward to seeing what you come up with.moomarc wrote:As a keyword, rebound isn't available for scripting yet. I was going to try some with the method I used above if the other devs were happy with the method, but I don't know if we can do the "as it resolves" part.SoulStorm wrote:Is Consuming Vapors scriptable? I've tried a few way of scripting it using Tribute to Hunger as a template, but nothing seems to work right. Are rebound cards just not scriptable at his point?
Who is online
Users browsing this forum: No registered users and 44 guests