Card Contributions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Contributions
by Sloth » 16 Nov 2011, 17:24
In my opinion:
Goblin Cadets should be save.
Witch Engine should be save as long as the AI won't use its ability (which I think is the case).
Measure of Wickedness is not ok (the AI should do something to get rid of it and 8 damage is a bit much).
Jinxed Choker is not ok since the AI will use the ability more or less randomly, wasting mana.
I think Jinxed Idol and Jinxed Ring are save, since the cost for the human is big and the effect is not.
For Chaos Lord a modulo function would help. I will try to script it.
EDIT: Modulo is in: Example X/Mod.2 will return 0 if X is even, 1 if it's odd.
Goblin Cadets should be save.
Witch Engine should be save as long as the AI won't use its ability (which I think is the case).
Measure of Wickedness is not ok (the AI should do something to get rid of it and 8 damage is a bit much).
Jinxed Choker is not ok since the AI will use the ability more or less randomly, wasting mana.
I think Jinxed Idol and Jinxed Ring are save, since the cost for the human is big and the effect is not.
For Chaos Lord a modulo function would help. I will try to script it.
EDIT: Modulo is in: Example X/Mod.2 will return 0 if X is even, 1 if it's odd.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Contributions
by moomarc » 16 Nov 2011, 19:22
Thanks Sloth. Sorry about continuously giving you more stray bits to code... But at least there's a few other cards that use the odd/even check as well.
-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 Contributions
by FabioFLX » 18 Nov 2011, 09:55
Hi moomarc, have you tried my Steel Hellkite then? I'm using it and I think it works well almost like the original card, which is not perfectly scriptable at the moment.FabioFLX wrote:I don't think my version has this problem: the code I posted takes out all the charge counters at the end of the turn and uses the ActivationLimit parameter to be used once per turn.moomarc wrote:This code would allow you to activate the ability any turn after its damaged a player rather only that turn. There would also be problems with cards like Doubling Season. I'm sure I've seen a restriction somewhere for limiting activations per turn in which case you just need to make the trigger execute the damage AB and take the charge counters out completely.
Re: Card Contributions
by moomarc » 18 Nov 2011, 11:28
Sorry I never got back to you. I was expecting some of the more senior/experienced scripters to post additional feedback. The card does look good but there are still corner cases that could cause issues with this implementation. Vampire Hexmage could remove the counter and some cards could move the counter. I've based a slightly cleaner script off of your base:
- Steel Hellkite | Open
- Code: Select all
Name:Steel Hellkite
ManaCost:6
Types:Artifact Creature Dragon
Text:no text
PT:5/5
K:Flying
A:AB$ Pump | Cost$ 2 | NumAtt$ +1 | SpellDescription$ CARDNAME gets +1/+0 until end of turn.
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ Animate | Static$ True | TriggerDescription$ Destroy each nonland permanent with converted mana cost X whose controller was dealt combat damage by CARDNAME this turn. Activate this ability only once each turn.
SVar:Animate:AB$ Animate | Cost$ 0 | Defined$ Self | Abilities$ ABDestroyAll | SVars$ X
SVar:ABDestroyAll:AB$ DestroyAll | Cost$ X | ValidCards$ Permanent.nonLand+cmcEQX+YouDontCtrl | ActivationLimit$ 1 | Hidden$ True | SpellDescription$ Activate CARDNAME destruction ability.
SVar:X:Count$xPaid
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/steel_hellkite.jpg
SetInfo:SOM|Rare|http://magiccards.info/scans/en/som/205.jpg
Oracle:Flying\n{2}: Steel Hellkite gets +1/+0 until end of turn.\n{X}: Destroy each nonland permanent with converted mana cost X whose controller was dealt combat damage by Steel Hellkite this turn. Activate this ability only once each turn.
End
-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 Contributions
by Sloth » 18 Nov 2011, 11:35
The biggest issue is that you can steal your version of Steel Hellkite and blow up your opponents stuff after it has dealt combat damage to you.moomarc wrote:Sorry I never got back to you. I was expecting some of the more senior/experienced scripters to post additional feedback. The card does look good but there are still corner cases that could cause issues with this implementation. Vampire Hexmage could remove the counter and some cards could move the counter. I've based a slightly cleaner script off of your base:Testing seems to show it works without the potential corner cases in your script. Only thing is that once it's dealt combat damage, There's an additional line of text on the card display panel saying "X: Activate Steel Hellkite destruction ability." There needs to be some sort of spell description otherwise you can't select it in the ability choice list. Any further testing and feedback would be appreciated.
- Steel Hellkite | Open
- Code: Select all
Name:Steel Hellkite
ManaCost:6
Types:Artifact Creature Dragon
Text:no text
PT:5/5
K:Flying
A:AB$ Pump | Cost$ 2 | NumAtt$ +1 | SpellDescription$ CARDNAME gets +1/+0 until end of turn.
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ Animate | Static$ True | TriggerDescription$ Destroy each nonland permanent with converted mana cost X whose controller was dealt combat damage by CARDNAME this turn. Activate this ability only once each turn.
SVar:Animate:AB$ Animate | Cost$ 0 | Defined$ Self | Abilities$ ABDestroyAll | SVars$ X
SVar:ABDestroyAll:AB$ DestroyAll | Cost$ X | ValidCards$ Permanent.nonLand+cmcEQX+YouDontCtrl | ActivationLimit$ 1 | Hidden$ True | SpellDescription$ Activate CARDNAME destruction ability.
SVar:X:Count$xPaid
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/steel_hellkite.jpg
SetInfo:SOM|Rare|http://magiccards.info/scans/en/som/205.jpg
Oracle:Flying\n{2}: Steel Hellkite gets +1/+0 until end of turn.\n{X}: Destroy each nonland permanent with converted mana cost X whose controller was dealt combat damage by Steel Hellkite this turn. Activate this ability only once each turn.
End
I have an idea. I will try to script a property of players like "wasDealtCombatDamageBySourceThisTurn".
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Contributions
by Sloth » 18 Nov 2011, 12:45
Ok. I've added the property "controllerWasDealtCombatDamageByThisTurn". A simple AB DestroyAll should do the trick.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Contributions
by moomarc » 18 Nov 2011, 13:20
Thanks. Works perfectly in my testing so far. I've committed to svn.Sloth wrote:Ok. I've added the property "controllerWasDealtCombatDamageByThisTurn". A simple AB DestroyAll should do the trick.
- Steel Hellkite | Open
- Name:Steel Hellkite
ManaCost:6
Types:Artifact Creature Dragon
Text:no text
PT:5/5
K:Flying
A:AB$ Pump | Cost$ 2 | NumAtt$ +1 | SpellDescription$ CARDNAME gets +1/+0 until end of turn.
A:AB$ DestroyAll | Cost$ X | ValidCards$ Permanent.nonLand+cmcEQX+controllerWasDealtCombatDamageByThisTurn | ActivationLimit$ 1 | Hidden$ True | SpellDescription$ Destroy each nonland permanent with converted mana cost X whose controller was dealt combat damage by CARDNAME this turn. Activate this ability only once each turn.
SVar:X:Count$xPaid
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/steel_hellkite.jpg
SetInfo:SOM|Rare|http://magiccards.info/scans/en/som/205.jpg
Oracle:Flying\n{2}: Steel Hellkite gets +1/+0 until end of turn.\n{X}: Destroy each nonland permanent with converted mana cost X whose controller was dealt combat damage by Steel Hellkite this turn. Activate this ability only once each turn.
End
-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 Contributions
by FabioFLX » 19 Nov 2011, 10:51
Good, it seems really better now. I'm just a novice scripter so I have missed the Animate$ keyword.moomarc wrote:Thanks. Works perfectly in my testing so far. I've committed to svn.Sloth wrote:Ok. I've added the property "controllerWasDealtCombatDamageByThisTurn". A simple AB DestroyAll should do the trick.
- Steel Hellkite | Open
- Name:Steel Hellkite
ManaCost:6
Types:Artifact Creature Dragon
Text:no text
PT:5/5
K:Flying
A:AB$ Pump | Cost$ 2 | NumAtt$ +1 | SpellDescription$ CARDNAME gets +1/+0 until end of turn.
A:AB$ DestroyAll | Cost$ X | ValidCards$ Permanent.nonLand+cmcEQX+controllerWasDealtCombatDamageByThisTurn | ActivationLimit$ 1 | Hidden$ True | SpellDescription$ Destroy each nonland permanent with converted mana cost X whose controller was dealt combat damage by CARDNAME this turn. Activate this ability only once each turn.
SVar:X:Count$xPaid
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/steel_hellkite.jpg
SetInfo:SOM|Rare|http://magiccards.info/scans/en/som/205.jpg
Oracle:Flying\n{2}: Steel Hellkite gets +1/+0 until end of turn.\n{X}: Destroy each nonland permanent with converted mana cost X whose controller was dealt combat damage by Steel Hellkite this turn. Activate this ability only once each turn.
End
Then, the introduction of controllerWasDealtCombatDamageByThisTurn did the trick in the end.
Re: Card Contributions
by moomarc » 21 Nov 2011, 09:25
- Scavenging Ooze | Open
- Name:Scavenging Ooze
ManaCost:1 G
Types:Creature Ooze
Text:no text
PT:2/2
A:AB$ ChangeZone | Cost$ G | Origin$ Graveyard | Destination$ Exile | TgtPrompt$ Choose target card in a graveyard | ValidTgts$ Card | RememberChanged$ True | SubAbility$ DBPutCounter | SpellDescription$ Exile target card from a graveyard. If it was a creature card, put a +1/+1 counter on CARDNAME and you gain 1 life.
SVar:DBPutCounter:DB$PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | ConditionDefined$ Targeted | ConditionPresent$ Creature | ConditionCompare$ EQ1 | SubAbility$ DBGainLife
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ 1 | ConditionDefined$ Targeted | ConditionPresent$ Creature | ConditionCompare$ EQ1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/scavenging_ooze.jpg
SetInfo:COM|Rare|http://magiccards.info/scans/en/cmd/170.jpg
Oracle:{G}: Exile target card from a graveyard. If it was a creature card, put a +1/+1 counter on Scavenging Ooze and you gain 1 life.
End
I've had some doozies lately so just posting here first for some feedback before I commit. This seems to work perfectly, with the exception that if there is more than one instance of the ability on the stack, it will only trigger for 'If it was a creature card' once, and that for the newest instance on the stack. All cards will be exiled correctly though, and all works as expected if players limit themselves to activating once before resolution (or one creature per stack is also fine).
-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 Contributions
by moomarc » 22 Nov 2011, 06:11
There was a bug posted about Gerrard's Verdict, so I've created a script-only version that fixes the problem. I'm not comfortable removing blocks from the code so could someone please double-check it and commit it.
Edit: Posted cleaner script
- Gerrard's Verdict | Open
- Name:Gerrard's Verdict
ManaCost:W B
Types:Sorcery
Text:no text
A:SP$ Discard | Cost$ W B | ValidTgts$ Player | TgtPrompt$ Select target player | Mode$ TgtChoose | NumCards$ 2 | RememberDiscarded$ True | SubAbility$ DBGainLife1 | SpellDescription$ Target player discards two cards. You gain 3 life for each land card discarded this way.
SVar:DBGainLife1:DB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X | SubAbility$ DBCleanup
SVar:X:Remembered$Valid Land/Times.3
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/gerrards_verdict.jpg
SetInfo:APC|Uncommon|http://magiccards.info/scans/en/ap/102.jpg
Oracle:Target player discards two cards. You gain 3 life for each land card discarded this way.
End
Edit: Posted cleaner script
-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 Contributions
by Hellfish » 22 Nov 2011, 08:41
Done.moomarc wrote:There was a bug posted about Gerrard's Verdict, so I've created a script-only version that fixes the problem. I'm not comfortable removing blocks from the code so could someone please double-check it and commit it.
- Gerrard's Verdict | Open
- Name:Gerrard's Verdict
ManaCost:W B
Types:Sorcery
Text:no text
A:SP$ Discard | Cost$ W B | ValidTgts$ Player | TgtPrompt$ Select target player | Mode$ TgtChoose | NumCards$ 2 | RememberDiscarded$ True | SubAbility$ DBGainLife1 | SpellDescription$ Target player discards two cards. You gain 3 life for each land card discarded this way.
SVar:DBGainLife1:DB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X | SubAbility$ DBCleanup
SVar:X:Remembered$Valid Land/Times.3
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/gerrards_verdict.jpg
SetInfo:APC|Uncommon|http://magiccards.info/scans/en/ap/102.jpg
Oracle:Target player discards two cards. You gain 3 life for each land card discarded this way.
End
Edit: Posted cleaner script

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 Contributions
by moomarc » 11 Dec 2011, 16:22
@Chris: I see you added Riku of Two Reflections. Were the stack instance errors fixed that I reported a few weeks ago when I first tried the card? If not there might be a few bug reports about it seeing as the problem really comes to the fore with this card because of it's double copying. Thanks for the add though. It really is a fun card.
-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 Contributions
by friarsol » 11 Dec 2011, 16:52
No they weren't. I was able to confirm they exist, but I don't think anyone dug any further.moomarc wrote:@Chris: I see you added Riku of Two Reflections. Were the stack instance errors fixed that I reported a few weeks ago when I first tried the card? If not there might be a few bug reports about it seeing as the problem really comes to the fore with this card because of it's double copying. Thanks for the add though. It really is a fun card.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Contributions
by Chris H. » 11 Dec 2011, 17:52
`moomarc wrote:@Chris: I see you added Riku of Two Reflections. Were the stack instance errors fixed that I reported a few weeks ago when I first tried the card? If not there might be a few bug reports about it seeing as the problem really comes to the fore with this card because of it's double copying. Thanks for the add though. It really is a fun card.
SoulStorm added the card to the SVN, I just added his commit logs to changes.txt.

-
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 Contributions
by squee1968 » 16 Dec 2011, 08:15
Here's Benalish Lancer. I've playtested it, and it works.
- Code: Select all
Name:Benalish Lancer
ManaCost:2 W
Types:Creature Human Knight
Text:no text
PT:2/2
K:Kicker:2 W
T:Mode$ ChangesZone | ValidCard$ Card.Self+kicked | Origin$ Any | Destination$ Battlefield | Execute$ TrigPut | Static$ True | TriggerDescription$ If CARDNAME was kicked, it enters the battlefield with two +1/+1 counters on it and with first strike.
SVar:TrigPut:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 2 | SubAbility$ DBPump
SVar:DBPump:DB$ Pump | Defined$ Self | KW$ First Strike | Permanent$ True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/benalish_lancer.jpg
SetInfo:INV|Common|http://magiccards.info/scans/en/in/7.jpg
Oracle:Kicker {2}{W} (You may pay an additional {2}{W} as you cast this spell.)\nIf Benalish Lancer was kicked, it enters the battlefield with two +1/+1 counters on it and with first strike.
End
- Code: Select all
Name:Kavu Titan
ManaCost:1 G
Types:Creature Kavu
Text:no text
PT:2/2
K:Kicker:2 G
T:Mode$ ChangesZone | ValidCard$ Card.Self+kicked | Origin$ Any | Destination$ Battlefield | Execute$ TrigPut | Static$ True | TriggerDescription$ If CARDNAME was kicked, it enters the battlefield with three +1/+1 counters on it and with trample.
SVar:TrigPut:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 3 | SubAbility$ DBPump
SVar:DBPump:DB$ Pump | Defined$ Self | KW$ Trample | Permanent$ True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/kavu_titan.jpg
SetInfo:INV|Rare|http://magiccards.info/scans/en/in/194.jpg
Oracle:Kicker {2}{G} (You may pay an additional {2}{G} as you cast this spell.)\nIf Kavu Titan was kicked, it enters the battlefield with three +1/+1 counters on it and with trample.
End
Who is online
Users browsing this forum: No registered users and 48 guests