Page 1 of 1

Turning Flashback into an AbilityFactory

PostPosted: 11 Nov 2011, 20:11
by Hellfish
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.

Re: Turning Flashback into an AbilityFactory

PostPosted: 11 Nov 2011, 21:53
by jeffwadsworth
Yeah, I have a comment. Yabba Dabba Dooo!! I don't want to ever see Snapcaster Mage requested again.

Re: Turning Flashback into an AbilityFactory

PostPosted: 12 Nov 2011, 06:02
by Sloth
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?

Re: Turning Flashback into an AbilityFactory

PostPosted: 12 Nov 2011, 09:57
by Hellfish
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?

Re: Turning Flashback into an AbilityFactory

PostPosted: 12 Nov 2011, 10:26
by Sloth
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?
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.

Re: Turning Flashback into an AbilityFactory

PostPosted: 12 Nov 2011, 11:36
by Hellfish
Heh, sneaky commit there! :D Nice work!

Re: Turning Flashback into an AbilityFactory

PostPosted: 12 Nov 2011, 12:35
by Sloth
Hellfish wrote:Heh, sneaky commit there! :D Nice work!
Yea, sorry for just commiting, but it turned out so easy and worked so well, I couldn't resist.

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.

Re: Turning Flashback into an AbilityFactory

PostPosted: 12 Nov 2011, 14:28
by friarsol
Sloth wrote:
Hellfish wrote:Heh, sneaky commit there! :D Nice work!
Yea, sorry for just commiting, but it turned out so easy and worked so well, I couldn't resist.

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

Re: Turning Flashback into an AbilityFactory

PostPosted: 12 Nov 2011, 14:47
by Sloth
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.
That's exactly what I planned. And it should be easy to pull off.