Problems with AF Animate
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
4 posts
• Page 1 of 1
Problems with AF Animate
by Sloth » 10 Jul 2011, 10:06
Studying the stAnimate keyword to convert it to continuous static effect, I found some issues with AF Animate.
AF Animate just overwrites BaseAttack and BaseDefense and stores the originals in the LeavesPlayCommands. If a continuous static effects that sets Power gets applied afterwards it will store the changed BaseAttack. If the effect by the AF Animate wears off first and the continuous effect later the card will be reverted to the wrong BaseAttack.
I think it's important to always keep the original (printed) P/T on the card and set the actual values in getUnswitchedAttack/getUnswitchedDefense.
So we will need new variables (like setPower / setToughness) to be stored in the card class.
Continuous static effect will be refreshed whenever state based effects are checked, so these variables will be just turned off (maybe set to -9) before the new effects are applied.
I don't really know how to handle AF Animate though. Any ideas?
AF Animate just overwrites BaseAttack and BaseDefense and stores the originals in the LeavesPlayCommands. If a continuous static effects that sets Power gets applied afterwards it will store the changed BaseAttack. If the effect by the AF Animate wears off first and the continuous effect later the card will be reverted to the wrong BaseAttack.
I think it's important to always keep the original (printed) P/T on the card and set the actual values in getUnswitchedAttack/getUnswitchedDefense.
So we will need new variables (like setPower / setToughness) to be stored in the card class.
Continuous static effect will be refreshed whenever state based effects are checked, so these variables will be just turned off (maybe set to -9) before the new effects are applied.
I don't really know how to handle AF Animate though. Any ideas?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Problems with AF Animate
by friarsol » 10 Jul 2011, 12:35
I'm going to start sounding like a broken record but sounds like we need a Stack to represent timestamps?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Problems with AF Animate
by slapshot5 » 10 Jul 2011, 13:37
Yep. I was about to say the same thing.friarsol wrote:I'm going to start sounding like a broken record but sounds like we need a Stack to represent timestamps?
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Problems with AF Animate
by Sloth » 17 Jul 2011, 07:16
Is anyone willing to fix this?
If not, I will at least try to get P/T right.
If not, I will at least try to get P/T right.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 40 guests