Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by jeffwadsworth » 10 Feb 2011, 17:40
Hellfish wrote:
Thanks. Here is another one that may be related. Using r.6282No issue with the script, the trigger class was assuming that all SpellAbilities have Target objects. Such is not the case however. I fixed that and added the card! Thanks for the report.
- Code: Select all
Name:Skittering Skirge
ManaCost:B B
Types:Creature Imp
Text:no text
PT:3/2
K:Flying
T:Mode$ SpellCast | ValidCard$ Card.Creature | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigSacrifice | TriggerDescription$ When you cast a creature spell, sacrifice CARDNAME.
SVar:TrigSacrifice:AB$Sacrifice | Cost$ 0
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/skittering_skirge.jpg
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 Development Questions
by friarsol » 10 Feb 2011, 18:01
Computers aren't that violent. They usually just "crash" instead of "bomb"jeffwadsworth wrote:This one bombs in similar fashion.

- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Hellfish » 10 Feb 2011, 18:12
I don't think Spells have Activating Players, only abilities do. Instead, use "ValidCard$ Creature.YouCtrl".
Oh, and Sol, you should've seen when my ex-laptop went
Oh, and Sol, you should've seen when my ex-laptop went

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 jeffwadsworth » 10 Feb 2011, 19:55
Really?Hellfish wrote:I don't think Spells have Activating Players, only abilities do. Instead, use "ValidCard$ Creature.YouCtrl".
Oh, and Sol, you should've seen when my ex-laptop went
https://code.google.com/p/cardforge/sou ... ail?r=6281
*Looks at Sol*
- 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 » 10 Feb 2011, 20:12
Don't blame me. Sloth started it. https://code.google.com/p/cardforge/sou ... ail?r=6051
Hellfish, why wouldn't Spells have Activating Players?
Hellfish, why wouldn't Spells have Activating Players?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Hellfish » 10 Feb 2011, 20:15
Because they're not activated, they're cast? Semantics, I know. And it does look like it is set for spells as well
I'll look into... Yeah, you know the drill
EDIT: Jeff, what creature did you play when it didn't work? It worked first try and onwards for me here.

I'll look into... Yeah, you know the drill

EDIT: Jeff, what creature did you play when it didn't work? It worked first try and onwards for me here.
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 friarsol » 10 Feb 2011, 20:23
I guess we could have tried to use setController() there, but that seemed weird to me at the time I was coding it up. "ActivatingPlayer" really just means "Controller of the SA"Hellfish wrote:Because they're not activated, they're cast? Semantics, I know. And it does look like it is set for spells as well![]()
I'll look into... Yeah, you know the drill
- 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 » 10 Feb 2011, 21:20
OK, now I'm confused, and I think I may have started the debate above over on the Bugs list. Isn't adding "+YouCtrl" the way to designate a spell that you cast? That's how it was templated on the cards I saw... or is that an old way that we're trying to move away from?
-Zirbert the n00b
-Zirbert the n00b
Re: Card Development Questions
by jeffwadsworth » 10 Feb 2011, 21:31
I am reinstalling Forge SVN from scratch because it still "crashed". I have a feeling the installation was whacked.
To answer your question Hellfish, it never got that far. I would chose the test deck and a two color deck for the AI and crash.
Ahh. I just saw a SVN fix that addressed the specific error I have been seeing after making test decks within the editor.
To answer your question Hellfish, it never got that far. I would chose the test deck and a two color deck for the AI and crash.
Ahh. I just saw a SVN fix that addressed the specific error I have been seeing after making test decks within the editor.
Last edited by jeffwadsworth on 10 Feb 2011, 21:39, 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 friarsol » 10 Feb 2011, 21:35
The only thing about YouCtrl that worries me in this situation is:Zirbert wrote:OK, now I'm confused, and I think I may have started the debate above over on the Bugs list. Isn't adding "+YouCtrl" the way to designate a spell that you cast? That's how it was templated on the cards I saw... or is that an old way that we're trying to move away from?
I control Ashenmoor Liege and Task Mage Assembly. AI uses the Assembly to hit my Liege. While I may control the Assembly permanent, my opponent controls the Ability that's targeting my Liege(sa.getActivatingPlayer() in Forge speak). This should trigger Liege and make my opponent take some damage, but it wouldn't.
There aren't many of these cases, and I don't know how many of them currently are in Forge, but there is a difference.
- 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 » 10 Feb 2011, 21:49
In that case, we may have a bigger problem - I checked something in the ballpark of 85 cards that were templated "Whenever you cast a ____spell". The 6 I pointed out were the ones that *didn't* use +YouCtrl. That means we've got a whoooole bunch of cards with this problem. Roughly 85 minus 6, to be less than exact.friarsol wrote:The only thing about YouCtrl that worries me in this situation is:Zirbert wrote:OK, now I'm confused, and I think I may have started the debate above over on the Bugs list. Isn't adding "+YouCtrl" the way to designate a spell that you cast? That's how it was templated on the cards I saw... or is that an old way that we're trying to move away from?
I control Ashenmoor Liege and Task Mage Assembly. AI uses the Assembly to hit my Liege. While I may control the Assembly permanent, my opponent controls the Ability that's targeting my Liege(sa.getActivatingPlayer() in Forge speak). This should trigger Liege and make my opponent take some damage, but it wouldn't.
There aren't many of these cases, and I don't know how many of them currently are in Forge, but there is a difference.
Re: Card Development Questions
by friarsol » 10 Feb 2011, 22:02
Casting a spell you don't control is even more of a corner case.Zirbert wrote:In that case, we may have a bigger problem - I checked something in the ballpark of 85 cards that were templated "Whenever you cast a ____spell". The 6 I pointed out were the ones that *didn't* use +YouCtrl. That means we've got a whoooole bunch of cards with this problem. Roughly 85 minus 6, to be less than exact.
For you todo this you need to gain access from somewhere. Like with a Grinning Totem. I think there's only about 5-10 of these types of cards in the game, and I don't think we have any of them implemented.
So, yes, this probably should be fixed, but no. It's not a huge problem (yet).
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 10 Feb 2011, 23:47
I am testing Flesh Reaver. Does anyone know if there is a "CardTotalDamage" type of stat?
- 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 » 10 Feb 2011, 23:58
It wouldn't need that. It just needs to grab the DamageAmount from the Trigger. Not sure if this is possible or not.jeffwadsworth wrote:I am testing Flesh Reaver. Does anyone know if there is a "CardTotalDamage" type of stat?
- 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 » 11 Feb 2011, 00:44
I've been trying Kookus (and there are a few similar "if you do / don't control a___" cards that could follow if this works). Can this line be tweaked to check for Keeper of Kookus during upkeep? Right now, it crashes Forge. I'm not sure about (a) using "IsNotPresent" in a trigger check; (b) whether IsNotPresent can look for a specific card name; (c) the syntax of the card name ("Keeper of Kookus" vs. "keeper_of_kookus", etc.):
- Code: Select all
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsNotPresent$ Permanent.Named.Keeper of Kookus | Execute$ TrigNoKeeper
Who is online
Users browsing this forum: No registered users and 12 guests