Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by Zirbert » 07 Mar 2011, 19:15
I was working on some zombies, and hit some problems. I'll keep it one issue to a post, for simplicity's sake.
I was trying to get Soulless One scripted, but I gave up after several attempts. Is there a way to get Forge to calculate power and toughness by adding those two variables (zombies on battlefield + zombies in graveyards)? I tried basing it on Dauntless Dourbark, but that didn't work (Count$ TypeOnBattlefield.Zombie,TypeInAllYards.Zombie). I tried using X for one of them ("Count$TypeOnBattlefield.Zombie/Plus.X) and defining X as Count$TypeInAllYards.Zombie in the Subvar, but Forge REALLY didn't like that (crashed).
I tried so many combinations and variations of syntax and technique that I lost track not long into it. Am I just barking up yet another unclimbable tree?
I was trying to get Soulless One scripted, but I gave up after several attempts. Is there a way to get Forge to calculate power and toughness by adding those two variables (zombies on battlefield + zombies in graveyards)? I tried basing it on Dauntless Dourbark, but that didn't work (Count$ TypeOnBattlefield.Zombie,TypeInAllYards.Zombie). I tried using X for one of them ("Count$TypeOnBattlefield.Zombie/Plus.X) and defining X as Count$TypeInAllYards.Zombie in the Subvar, but Forge REALLY didn't like that (crashed).
I tried so many combinations and variations of syntax and technique that I lost track not long into it. Am I just barking up yet another unclimbable tree?
Re: Card Development Questions
by Sloth » 07 Mar 2011, 19:47
Yes, I think it's not possible at the moment. Should be easy to enable it though.Zirbert wrote:I was working on some zombies, and hit some problems. I'll keep it one issue to a post, for simplicity's sake.
I was trying to get Soulless One scripted, but I gave up after several attempts. Is there a way to get Forge to calculate power and toughness by adding those two variables (zombies on battlefield + zombies in graveyards)? I tried basing it on Dauntless Dourbark, but that didn't work (Count$ TypeOnBattlefield.Zombie,TypeInAllYards.Zombie). I tried using X for one of them ("Count$TypeOnBattlefield.Zombie/Plus.X) and defining X as Count$TypeInAllYards.Zombie in the Subvar, but Forge REALLY didn't like that (crashed).
I tried so many combinations and variations of syntax and technique that I lost track not long into it. Am I just barking up yet another unclimbable tree?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by Zirbert » 07 Mar 2011, 20:08
Thanks for the info, Sloth!
I guess I can combine these two, because they're both yes/no answers. I suspect that both are No, or at best, "not yet", since I couldn't find examples of any cards that indicate otherwise:
-Are nonmana Morph costs doable? (Pay X life, discard, etc.)
-Can tokens be defined as having triggered abilities (as opposed to straight Ability Factory single-line abilities)? I was trying for Skirk Ridge Exhumer, but couldn't make it happen.
I guess I can combine these two, because they're both yes/no answers. I suspect that both are No, or at best, "not yet", since I couldn't find examples of any cards that indicate otherwise:
-Are nonmana Morph costs doable? (Pay X life, discard, etc.)
-Can tokens be defined as having triggered abilities (as opposed to straight Ability Factory single-line abilities)? I was trying for Skirk Ridge Exhumer, but couldn't make it happen.
Re: Card Development Questions
by Hellfish » 07 Mar 2011, 20:11
Tokens with triggered abilities are possible. Check out Mitotic Slime on the SVN.
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 ZzzzSleep » 07 Mar 2011, 21:05
Would it work to have a base power/toughness of TypeOnBattlefield.Zombie and a static pump of TypeInAllYards.Zombie? Or would that have unintended consequences?Zirbert wrote:I was working on some zombies, and hit some problems. I'll keep it one issue to a post, for simplicity's sake.
I was trying to get Soulless One scripted, but I gave up after several attempts. Is there a way to get Forge to calculate power and toughness by adding those two variables (zombies on battlefield + zombies in graveyards)? I tried basing it on Dauntless Dourbark, but that didn't work (Count$ TypeOnBattlefield.Zombie,TypeInAllYards.Zombie). I tried using X for one of them ("Count$TypeOnBattlefield.Zombie/Plus.X) and defining X as Count$TypeInAllYards.Zombie in the Subvar, but Forge REALLY didn't like that (crashed).
I tried so many combinations and variations of syntax and technique that I lost track not long into it. Am I just barking up yet another unclimbable tree?
Re: Card Development Questions
by Zirbert » 07 Mar 2011, 22:03
Thanks, that looks like I'll be able to adapt it. And thanks for tweaking those 2 Zombie cards from pack 2 to the latest and greatest methods, too!Hellfish wrote:Tokens with triggered abilities are possible. Check out Mitotic Slime on the SVN.
Re: Card Development Questions
by Zirbert » 07 Mar 2011, 22:22
That's a really interesting idea, and would be easy to script. I'm not seeing any problems with it offhand.ZzzzSleep wrote:Would it work to have a base power/toughness of TypeOnBattlefield.Zombie and a static pump of TypeInAllYards.Zombie? Or would that have unintended consequences?Zirbert wrote: Is there a way to get Forge to calculate power and toughness by adding those two variables (zombies on battlefield + zombies in graveyards)?
On a side note, I'm already worried about how I implemented Strength of Night - I'm think the Kicked version might just be a multicolored spell to Forge with a cost of 2 G B, which has unwanted interactions with some triggers (Gloryscale Viashino, the Eidolons, etc.). I haven't tested that yet, and I'm hoping I'm wrong. This may explain why we don't seem to have many off-color kicker cards....
[EDIT - I tested Strength of Night, and playing it kicked doesn't trigger Demon's Horn or Entropic Eidolon. Looks like we're OK to do off-color kickers. Updating in case my wondering set anybody else to wondering.]
Anybody else got any thoughts on the "static + pump" idea?
Re: Card Development Questions
by jeffwadsworth » 08 Mar 2011, 00:19
That would be a hack. It is better to wait until the xmath is brought up to date. Just my opinion.Zirbert wrote:That's a really interesting idea, and would be easy to script. I'm not seeing any problems with it offhand.ZzzzSleep wrote:Would it work to have a base power/toughness of TypeOnBattlefield.Zombie and a static pump of TypeInAllYards.Zombie? Or would that have unintended consequences?Zirbert wrote: Is there a way to get Forge to calculate power and toughness by adding those two variables (zombies on battlefield + zombies in graveyards)?
On a side note, I'm already worried about how I implemented Strength of Night - I'm think the Kicked version might just be a multicolored spell to Forge with a cost of 2 G B, which has unwanted interactions with some triggers (Gloryscale Viashino, the Eidolons, etc.). I haven't tested that yet, and I'm hoping I'm wrong. This may explain why we don't seem to have many off-color kicker cards....
[EDIT - I tested Strength of Night, and playing it kicked doesn't trigger Demon's Horn or Entropic Eidolon. Looks like we're OK to do off-color kickers. Updating in case my wondering set anybody else to wondering.]
Anybody else got any thoughts on the "static + pump" idea?
- 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
by friarsol » 08 Mar 2011, 00:30
Woohoo a convert! I agree. Just wait until the code is updated. It's not like we're slow pokes about updating things around here.jeffwadsworth wrote:That would be a hack. It is better to wait until the xmath is brought up to date. Just my opinion.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Zirbert » 08 Mar 2011, 00:44
It's also not like there aren't plenty of other scriptable cards that I can do instead. My "cards to try" list gets longer every time I look at Gatherer. So, motion carried: for the time being, I shall allow Soulless One to rest in peace.friarsol wrote:Woohoo a convert! I agree. Just wait until the code is updated. It's not like we're slow pokes about updating things around here.jeffwadsworth wrote:That would be a hack. It is better to wait until the xmath is brought up to date. Just my opinion.
Re: Card Development Questions
by slapshot5 » 08 Mar 2011, 18:18
I think I ran into this one other time. Are AbilityFactory abilities added before or after the CardFactory processing would take place? I'm thinking before. Is there a reason for this? It makes cards like Genju of the Realm not scriptable because the AF ability is cleared when card.clearSpellAbility() is called.
-slapshot5
- Code: Select all
Name:Genju of the Realm
ManaCost:W U B R G
Types:Legendary Enchantment Aura
Text:no text
K:Enchant Land
#This doesn't work because I think abilities are added before CardFactory is processed, which clears this ability. Same problem as Caribou Range I think.
#Interestingly enough, the trigger works
A:AB$Animate | Cost$ 2 | Defined$ Enchanted | Power$ 8 | Toughness$ 12 | Types$ Creature,Legendary,Spirit | Keywords$ Trample | SpellDescription$ Enchanted land becomes a legendary 8/12 Spirit creature with trample until end of turn. It's still a land.
T:Mode$ ChangesZone | ValidCard$ Card.AttachedBy | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Battlefield | Execute$ TrigReturnOwner | OptionalDecider$ You | TriggerDescription$ When enchanted land is put into a graveyard, you may return CARDNAME from your graveyard to your hand.
SVar:TrigReturnOwner:AB$ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Graveyard | Destination$ Hand
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/genju_of_the_realm.jpg
End
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by friarsol » 08 Mar 2011, 20:50
Slap, just change the card.clearSpellAbility() to card.clearFirstSpellAbility() (I think thats the name) we shouldn't be just clearing all of the spell abilities there anyway.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by slapshot5 » 08 Mar 2011, 21:22
Thanks. That worked. I only did it for the generic aura code. If I can get an AF_Enchant up and running, most of this should be moot anyway.friarsol wrote:Slap, just change the card.clearSpellAbility() to card.clearFirstSpellAbility() (I think thats the name) we shouldn't be just clearing all of the spell abilities there anyway.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by jeffwadsworth » 08 Mar 2011, 23:53
Cheers.
Last edited by jeffwadsworth on 09 Mar 2011, 06:55, edited 2 times in total.
- 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
by jeffwadsworth » 09 Mar 2011, 01:22
Fixed.
Last edited by jeffwadsworth on 09 Mar 2011, 07:07, edited 1 time in total.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Who is online
Users browsing this forum: No registered users and 21 guests