Turning Flashback into an AbilityFactory
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
9 posts
• Page 1 of 1
Turning Flashback into an AbilityFactory
by Hellfish » 11 Nov 2011, 20:11
As Accountancy accurately accentuates (Gotta meet my allitteration quota) in the Card Requests thread, a lot of people are requesting Snapcaster Mage.Our current way of doing flashback doesn't really hold up to this, but I got to thinking about maybe turning it into an AF. The AF itself would in actuality only wrap an anonymous SpellAbility class around the spellAbility returned by the host cards getFirstSpellAbility(), similar to what TriggerHandler does already. This would allow us to pump flashback simply using ability pumps and enable 4 more cards (Snapcaster Mage, Recoup, Past in Flames and Dralnu, Lich Lord).
Thoughts,worries and/or comments?
EDIT: Heh, well I feel quite the fool now. Wrapping the first spellability for Flashback is basically what we're doing already. So my proposal above basically just boils down to exposing it via AF rather than just hardcoded in postFactoryKeywords.
Thoughts,worries and/or comments?
EDIT: Heh, well I feel quite the fool now. Wrapping the first spellability for Flashback is basically what we're doing already. So my proposal above basically just boils down to exposing it via AF rather than just hardcoded in postFactoryKeywords.
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: Turning Flashback into an AbilityFactory
by jeffwadsworth » 11 Nov 2011, 21:53
Yeah, I have a comment. Yabba Dabba Dooo!! I don't want to ever see Snapcaster Mage requested again.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Turning Flashback into an AbilityFactory
by Sloth » 12 Nov 2011, 06:02
I think I have a pretty good plan to implement Flashback. Easy to pull off and it will be grantable via the normal Pump AF. Did you already start coding Hellfish?
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Turning Flashback into an AbilityFactory
by Hellfish » 12 Nov 2011, 09:57
I've setup the AF skeleton and started tinkering with letting AF_Pump give any ability. Not so much that it's a problem, in other words. 
What's the plan, if you don't mind me asking?
What's the plan, if you don't mind me asking?
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: Turning Flashback into an AbilityFactory
by Sloth » 12 Nov 2011, 10:26
I'm tinkering with using Flashback just like the keyword "May be played". The only difference is that the spell should know that it was flashbacked (done by setting the flashback flag) to be exiled after resolution.Hellfish wrote:I've setup the AF skeleton and started tinkering with letting AF_Pump give any ability. Not so much that it's a problem, in other words.
What's the plan, if you don't mind me asking?
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Turning Flashback into an AbilityFactory
by Hellfish » 12 Nov 2011, 11:36
Heh, sneaky commit there!
Nice work!
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: Turning Flashback into an AbilityFactory
by Sloth » 12 Nov 2011, 12:35
Yea, sorry for just commiting, but it turned out so easy and worked so well, I couldn't resist.Hellfish wrote:Heh, sneaky commit there!Nice work!
I'm actually thinking about converting all flashback cards to a similar system, because Yixlid Jailer should turn off all flashbacking and this does not work at the moment.
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Turning Flashback into an AbilityFactory
by friarsol » 12 Nov 2011, 14:28
Didn't get a chance to comment, but I was going to suggest something pretty similar to what Sloth put in. Doing it as a straight up keyword that isn't pre-parsed makes it much easier to handle in a general sense. Is the cost of the Spell getting changed to the Flashback cost? Also, it is possible for cards to have multiple Flashback keywords, so this probably needs to loop the Keywords, not just check if one Flashback exists?Sloth wrote:Yea, sorry for just commiting, but it turned out so easy and worked so well, I couldn't resist.Hellfish wrote:Heh, sneaky commit there!Nice work!
I'm actually thinking about converting all flashback cards to a similar system, because Yixlid Jailer should turn off all flashbacking and this does not work at the moment.
Edit: So if the new Flashback keyword is structured: Flashback {cost}, where {cost} is optional, we can just merge the old Flashback keyword with the new one. And make all Flashback spells generate "on the fly", instead of having an extra SA sit on the card object. This would also allow us to cleanup all of the scripted Flashback spells. There looks to be about 71 with "Flashback$ True" due to the old Flashback keyword not supporting the Cost object.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Turning Flashback into an AbilityFactory
by Sloth » 12 Nov 2011, 14:47
That's exactly what I planned. And it should be easy to pull off.friarsol wrote:Didn't get a chance to comment, but I was going to suggest something pretty similar to what Sloth put in. Doing it as a straight up keyword that isn't pre-parsed makes it much easier to handle in a general sense. Is the cost of the Spell getting changed to the Flashback cost? Also, it is possible for cards to have multiple Flashback keywords, so this probably needs to loop the Keywords, not just check if one Flashback exists?
Edit: So if the new Flashback keyword is structured: Flashback {cost}, where {cost} is optional, we can just merge the old Flashback keyword with the new one. And make all Flashback spells generate "on the fly", instead of having an extra SA sit on the card object. This would also allow us to cleanup all of the scripted Flashback spells. There looks to be about 71 with "Flashback$ True" due to the old Flashback keyword not supporting the Cost object.
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: ArchieRoW and 27 guests