Card Contributions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Contributions
by moomarc » 25 Jan 2012, 11:31
I've added Kalitas, Bloodchief of Ghet and Kaervek's Purge. To do it I had to add RememberDestroyed to AbilityFactoryDestroy (it was previously only available to DestroyAll). I checked AbilityFactorySacrifice for the differences in method between the regular and 'All' variants, and it works in all my testing but I'd appreciate one of you guys checking it out.
Edit: Only issue I had (and might be a non-issue) was if you use Snapcaster Mage to flash Kaervek's Purge. I'm not too sure what the correct interaction is seeing as the X in its casting cost is dependant on the target. Currently nothing happens. This is just a general rules thing though and nothing to do with my additions.
Edit: Only issue I had (and might be a non-issue) was if you use Snapcaster Mage to flash Kaervek's Purge. I'm not too sure what the correct interaction is seeing as the X in its casting cost is dependant on the target. Currently nothing happens. This is just a general rules thing though and nothing to do with my additions.
-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 Iran » 25 Jan 2012, 12:59
Text I found in internet (I don't known with its help) =>moomarc wrote:I've added Kalitas, Bloodchief of Ghet and Kaervek's Purge. To do it I had to add RememberDestroyed to AbilityFactoryDestroy (it was previously only available to DestroyAll). I checked AbilityFactorySacrifice for the differences in method between the regular and 'All' variants, and it works in all my testing but I'd appreciate one of you guys checking it out.
Edit: Only issue I had (and might be a non-issue) was if you use Snapcaster Mage to flash Kaervek's Purge. I'm not too sure what the correct interaction is seeing as the X in its casting cost is dependant on the target. Currently nothing happens. This is just a general rules thing though and nothing to do with my additions.
Your understanding is incorrect. There are indeed situations, where the only legal choice for X is 0:havaok wrote:Originally Posted by havaok View Post
It was my understanding that if a card had in its mana cost, when you use snapcaster mage on it, X = 0. Can anyone clarify this?
107.3b. If a player is casting a spell that has an

The bolded part is the important bit here. The flashback cost is an alternative cost, and it does by definition include X, so 0 is not the only legal choice for X.
reference:
http://forums.mtgsalvation.com/showthread.php?t=360199
Re: Card Contributions
by moomarc » 25 Jan 2012, 14:02
I just tested a few more cards and seems that Snapcaster Mage has this problem with all X-cost cards it tries to flash (whether targeted or defined).
-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 squee1968 » 25 Jan 2012, 19:26
Worthy Cause
- Code: Select all
Name:Worthy Cause
ManaCost:W
Types:Instant
Text:no text
SVar:Buyback:2
A:AB$ GainLife | Cost$ W Sac<1/Creature> | LifeAmount$ X | SpellDescription$ You gain life equal to the sacrificed creature's toughness.
SVar:X:Sacrificed$CardToughness
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/worthy_cause.jpg
SetInfo:TMP|Uncommon|http://magiccards.info/scans/tp/en/265.jpg
Oracle:Buyback {2} (You may pay an additional {2} as you cast this spell. If you do, put this card into your hand as it resolves.)\nAs an additional cost to cast Worthy Cause, sacrifice a creature.\nYou gain life equal to the sacrificed creature’s toughness.
End
Re: Card Contributions
by moomarc » 25 Jan 2012, 19:42
Wow. A lot has changed since I got into the scripting not so long ago. I remember trying this card but couldn't be done yet. The script looks fine though except that it should be A:SP not A:AB (spell instead of activated ability). If no-one else has added it yet when I get to my pc tomorrow I'll test further and commit. Thanks.squee1968 wrote:Worthy Cause
- Code: Select all
Name:Worthy Cause
ManaCost:W
Types:Instant
Text:no text
SVar:Buyback:2
A:AB$ GainLife | Cost$ W Sac<1/Creature> | LifeAmount$ X | SpellDescription$ You gain life equal to the sacrificed creature's toughness.
SVar:X:Sacrificed$CardToughness
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/worthy_cause.jpg
SetInfo:TMP|Uncommon|http://magiccards.info/scans/tp/en/265.jpg
Oracle:Buyback {2} (You may pay an additional {2} as you cast this spell. If you do, put this card into your hand as it resolves.)\nAs an additional cost to cast Worthy Cause, sacrifice a creature.\nYou gain life equal to the sacrificed creature’s toughness.
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 jeffwadsworth » 25 Jan 2012, 20:18
Forge is lucky. It has insanely talented and dedicated java-wizards.moomarc wrote:Wow. A lot has changed since I got into the scripting not so long ago. I remember trying this card but couldn't be done yet. The script looks fine though except that it should be A:SP not A:AB (spell instead of activated ability). If no-one else has added it yet when I get to my pc tomorrow I'll test further and commit. Thanks.squee1968 wrote:Worthy Cause
- Code: Select all
Name:Worthy Cause
ManaCost:W
Types:Instant
Text:no text
SVar:Buyback:2
A:AB$ GainLife | Cost$ W Sac<1/Creature> | LifeAmount$ X | SpellDescription$ You gain life equal to the sacrificed creature's toughness.
SVar:X:Sacrificed$CardToughness
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/worthy_cause.jpg
SetInfo:TMP|Uncommon|http://magiccards.info/scans/tp/en/265.jpg
Oracle:Buyback {2} (You may pay an additional {2} as you cast this spell. If you do, put this card into your hand as it resolves.)\nAs an additional cost to cast Worthy Cause, sacrifice a creature.\nYou gain life equal to the sacrificed creature’s toughness.
End
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Contributions
by jeffwadsworth » 26 Jan 2012, 06:32
I was looking through some of the python generated card lists that moomarc sent my way. (Thanks).
There seems to be quite a few garbage "cards" in there. What the heck is "I Delight in Your Convulsions" in set_arc?? Or even better, "I Bask in Your Silent Awe". No wonder we have 2000+ left.
There seems to be quite a few garbage "cards" in there. What the heck is "I Delight in Your Convulsions" in set_arc?? Or even better, "I Bask in Your Silent Awe". No wonder we have 2000+ left.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Contributions
by moomarc » 26 Jan 2012, 07:13
Just tested Worthy Cause and was reminded of the other reason this didn't work before. Buyback as a keyword doesn't support additional costs. Should have remembered this before.
-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 » 26 Jan 2012, 07:23
Those are Archenemy schemes. Just another gamemode to supportjeffwadsworth wrote:I was looking through some of the python generated card lists that moomarc sent my way. (Thanks).
There seems to be quite a few garbage "cards" in there. What the heck is "I Delight in Your Convulsions" in set_arc?? Or even better, "I Bask in Your Silent Awe". No wonder we have 2000+ left.

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 » 26 Jan 2012, 07:26
that list is exhaustive and contains the official casual formats like Planechase, Archenemy and Vanguard as well as the different box sets.jeffwadsworth wrote:I was looking through some of the python generated card lists that moomarc sent my way. (Thanks).
There seems to be quite a few garbage "cards" in there. What the heck is "I Delight in Your Convulsions" in set_arc?? Or even better, "I Bask in Your Silent Awe". No wonder we have 2000+ left.
The specific cards you mentioned are Archenemy schemes and are used by the player designated as the archenemy to level the playing field (seeing as its multiplayer 1-vs-many). Similarly VAN has the Vanguard format avatars and HOP contains the plane cards used in planechase formats.
Oneday Forge will hopefully support some of them.
EDIT: we could probably implement a localised single player Archenemy for Forge where the AI is always the archenemy, because it could do with some of those schemes to help level the playing field.
-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 jeffwadsworth » 26 Jan 2012, 08:12
Ahh. I got in around Fallen Empires and out at Alliances. Missed all that newer stuff. Thanks for the explanation.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Contributions
by Sloth » 26 Jan 2012, 14:16
moomarc wrote:Edit: Only issue I had (and might be a non-issue) was if you use Snapcaster Mage to flash Kaervek's Purge. I'm not too sure what the correct interaction is seeing as the X in its casting cost is dependant on the target. Currently nothing happens. This is just a general rules thing though and nothing to do with my additions.
Can you clarify this? What problem are you speaking of?moomarc wrote:I just tested a few more cards and seems that Snapcaster Mage has this problem with all X-cost cards it tries to flash (whether targeted or defined).
When i give Kaervek's Purge flashback with Snapcaster Mage its flashback cost is






-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Contributions
by moomarc » 26 Jan 2012, 16:14
It wasn't working that way for me. It seemed as though X was always equal to 0. It also wasn't letting me target anything with it so maybe something was corrupt in my local rep. But even untargeted X-cost card like (actually I can't remember offhand which card it was I tested but it was a You gain X life from one of the Portal expansions) weren't giving me an option to pay X. I'll test again tomorrow.
-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 » 27 Jan 2012, 07:50
Arg... Seems I had just slept far too little. Its working fine now. I think I was probably expecting the card selected with SM's to be cast directly after the selection prompt instead of it gaining flashback until EOT. Apologies for wasting your time.
-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 ArsenalNut » 29 Jan 2012, 18:54
Looking at Demonmail Huaberk. Since eqPump doesn't support non mana cost, are there any problems implementing like this instead?
- Demonmail Hauberk | Open
- Name:Demonmail Hauberk
ManaCost:4
Types:Artifact Equipment
Text:no text
A:AB$ Attach | Cost$ Sac<1/Creature> | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select targe creature you control | SorcerySpeed$ True | PrecostDesc$ Equip - | SpellDescription$ Attach CARDNAME to target creature you control.
S:Mode$ Continuous | Affected$ Card.EquippedBy | AddPower$ 4 | AddToughness$ 2 | Description$ Equipped creature gets +4/+2.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/demonmail_hauberk.jpg
End
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Who is online
Users browsing this forum: No registered users and 52 guests