It is currently 12 Sep 2025, 13:55
   
Text Size

Problems with AF Animate

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Problems with AF Animate

Postby 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?
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Problems with AF Animate

Postby 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

Postby slapshot5 » 10 Jul 2011, 13:37

friarsol wrote:I'm going to start sounding like a broken record but sounds like we need a Stack to represent timestamps?
Yep. I was about to say the same thing.
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

Postby Sloth » 17 Jul 2011, 07:16

Is anyone willing to fix this?

If not, I will at least try to get P/T right.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 36 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 36 users online :: 0 registered, 0 hidden and 36 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 36 guests

Login Form