It is currently 11 Sep 2025, 21:44
   
Text Size

StaticAbilityContinuous

Post MTG Forge Related Programming Questions Here

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

StaticAbilityContinuous

Postby slapshot5 » 27 Mar 2012, 03:12

In StaticAbilityContinuous, is there a reason we call directly to CardFactoryUtil.xCount instead of using the AbilityFactory.calculateAmount wrapper?

This prevents us from using things like Remembered$CardCounters.CHARGE with the StaticEffect. I change it like this to do some testing:

Code: Select all
//CardFactoryUtil.xCount(hostCard, hostCard.getSVar(setT));
AbilityFactory.calculateAmount(hostCard, setT, null);
and it works (for my purposes - implementing Gutter Grime).

Does anyone more familiar here know if this was done for a reason or if changing to calculateAmount would break other things?

Thanks,
slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: StaticAbilityContinuous

Postby Sloth » 28 Mar 2012, 06:13

I think there should be no problem.

Maybe xCount and calculateAmount could be merged/reorganized now that there is no reason not to use calculateAmount.
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 33 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 33 users online :: 0 registered, 0 hidden and 33 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 33 guests

Login Form