Goblin Sharpshooter
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
6 posts
• Page 1 of 1
Goblin Sharpshooter
by Chris H. » 24 Feb 2011, 14:57
Currently, Goblin Sharpshooter looks like this, notice the card specific keyword:
We have a section of code in GameActionUtil that untaps the Goblin Sharpshooter without using the stack:
If this card is converted to triggers, the untap will use the stack. So, should this card be converted to triggers which would use the stack or should this card be given a note stating do not convert.
I thought that I would ask before moving forward on this card.
- Goblin Sharpshooter card | Open
- Name:Goblin Sharpshooter
ManaCost:2 R
Types:Creature Goblin
Text:no text
PT:1/1
A:AB$DealDamage | Cost$ T | Tgt$ TgtCP | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player.
K:CARDNAME doesn't untap during your untap step.
K:Whenever a creature is put into a graveyard from the battlefield, untap Goblin Sharpshooter.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_sharpshooter.jpg
SetInfo:ONS|Rare|http://magiccards.info/scans/en/on/207.jpg
End
We have a section of code in GameActionUtil that untaps the Goblin Sharpshooter without using the stack:
- Code: Select all
private static void destroyCreature_Goblin_Sharpshooter(Card c, Card destroyed) {
//not using stack for this one
if(AllZone.GameAction.isCardInPlay(c) && c.isTapped()) c.untap();
}
If this card is converted to triggers, the untap will use the stack. So, should this card be converted to triggers which would use the stack or should this card be given a note stating do not convert.
I thought that I would ask before moving forward on this card.
-

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: Goblin Sharpshooter
by Hellfish » 24 Feb 2011, 15:32
I think it can be converted fine since, AFAICT, it's just a straight-forward triggered ability.
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: Goblin Sharpshooter
by friarsol » 24 Feb 2011, 15:39
There are lots of cards that incorrectly don't use the stack that are hardcoded, I'm not sure when those decisions were made, but in general they are incorrect.
Hellfish is right. There's nothing tricky about this one.
The best part is clearing out these one-time use keywords.
Hellfish is right. There's nothing tricky about this one.
The best part is clearing out these one-time use keywords.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Goblin Sharpshooter
by Chris H. » 24 Feb 2011, 16:10
Thank you for the confirmation, Hellfish and Sol. 
I suspect that cards that are implemented this way were done so since it requires less time to code the cards and it tends not to grow the source code by large amounts of new code for a single card.
I spent a lot of time trying to actually find this keyword and was unsuccessful. It's only purpose may be to play that text string into the card text area. The actual test in GameActionUtil tests for the card name and not for the keyword as far as I can tell. But I decided it was not worth too much time to try and track this down.
And yes, I do not mind deprecating another keyword.
I suspect that cards that are implemented this way were done so since it requires less time to code the cards and it tends not to grow the source code by large amounts of new code for a single card.
I spent a lot of time trying to actually find this keyword and was unsuccessful. It's only purpose may be to play that text string into the card text area. The actual test in GameActionUtil tests for the card name and not for the keyword as far as I can tell. But I decided it was not worth too much time to try and track this down.
And yes, I do not mind deprecating another keyword.
-

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: Goblin Sharpshooter
by slapshot5 » 24 Feb 2011, 17:23
I've run into this a couple time. I wouldn't be surprised if there are a few others out there.Chris H. wrote:I spent a lot of time trying to actually find this keyword and was unsuccessful. It's only purpose may be to play that text string into the card text area. The actual test in GameActionUtil tests for the card name and not for the keyword as far as I can tell. But I decided it was not worth too much time to try and track this down.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Goblin Sharpshooter
by Chris H. » 24 Feb 2011, 17:51
`slapshot5 wrote:I've run into this a couple time. I wouldn't be surprised if there are a few others out there.Chris H. wrote:I spent a lot of time trying to actually find this keyword and was unsuccessful. It's only purpose may be to play that text string into the card text area. The actual test in GameActionUtil tests for the card name and not for the keyword as far as I can tell. But I decided it was not worth too much time to try and track this down.
There are a few dealing with auras that I put in myself a long time ago. The aura code may need to be redone at some point to bring it up to date with recent advancements.
-

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
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 9 guests