It is currently 09 Jun 2025, 15:44
   
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 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?
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Development Questions

Postby Sloth » 07 Mar 2011, 19:47

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?
Yes, I think it's not possible at the moment. Should be easy to enable it though.
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 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.
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Development Questions

Postby 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
User avatar
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

Postby ZzzzSleep » 07 Mar 2011, 21:05

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?
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?
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Card Development Questions

Postby Zirbert » 07 Mar 2011, 22:03

Hellfish wrote:Tokens with triggered abilities are possible. Check out Mitotic Slime on the SVN.
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!
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Development Questions

Postby Zirbert » 07 Mar 2011, 22:22

ZzzzSleep wrote:
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)?
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?
That's a really interesting idea, and would be easy to script. I'm not seeing any problems with it offhand.

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?
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Development Questions

Postby jeffwadsworth » 08 Mar 2011, 00:19

Zirbert wrote:
ZzzzSleep wrote:
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)?
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?
That's a really interesting idea, and would be easy to script. I'm not seeing any problems with it offhand.

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?
That would be a hack. It is better to wait until the xmath is brought up to date. Just my opinion.
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 friarsol » 08 Mar 2011, 00:30

jeffwadsworth wrote:That would be a hack. It is better to wait until the xmath is brought up to date. Just my opinion.
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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Zirbert » 08 Mar 2011, 00:44

friarsol wrote:
jeffwadsworth wrote:That would be a hack. It is better to wait until the xmath is brought up to date. Just my opinion.
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.
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.
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Development Questions

Postby 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.
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
The trigger fires off as expected however.

-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

Postby 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

Postby slapshot5 » 08 Mar 2011, 21:22

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.
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.

-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

Postby 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

Postby 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

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 37 guests


Who is online

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

Login Form