AbilityFactory TODO list
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: AbilityFactory TODO list
by slapshot5 » 10 Jun 2011, 21:50
Added an AF for RemoveCounterAll. I think Heartmender is the only thing that would use it right now.
-slapshot5
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: AbilityFactory TODO list
by Sloth » 19 Jun 2011, 21:25
I'm working on SacrificeAll (for All Is Dust and Yukora, the Prisoner).
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: AbilityFactory TODO list
by slapshot5 » 27 Jun 2011, 00:46
For the DelayedTrigger AF, I see it is currently only for drawbacks. If I add a getAbility() to that, could it be used for things like Transluminant? Is this desirable, or is there a different way things like that should be done.
-slapshot5
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: AbilityFactory TODO list
by friarsol » 27 Jun 2011, 01:04
I think that would be the right way to go for that card. I doubt there are many cards that have similar effects. I can't think of any Spells that have delayed abilities, but I wouldn't be surprised if they exist.slapshot5 wrote:For the DelayedTrigger AF, I see it is currently only for drawbacks. If I add a getAbility() to that, could it be used for things like Transluminant? Is this desirable, or is there a different way things like that should be done.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: AbilityFactory TODO list
by slapshot5 » 27 Jun 2011, 01:15
Not sure about Spells. I'll add spells too, at the very least, for completeness.
-slapshot5
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: AbilityFactory TODO list
by slapshot5 » 28 Jun 2011, 00:45
Added AF_Protection. I'm sure there is room for improvement not that this is split off from AF_Pump.
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: AbilityFactory TODO list
by friarsol » 28 Jun 2011, 00:50
Awesome. Didn't you say you were going to be less busy since you just got a new job?slapshot5 wrote:Added AF_Protection. I'm sure there is room for improvement not that this is split off from AF_Pump.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: AbilityFactory TODO list
by slapshot5 » 28 Jun 2011, 01:37
That's what lunch breaks are for.friarsol wrote:Awesome. Didn't you say you were going to be less busy since you just got a new job?slapshot5 wrote:Added AF_Protection. I'm sure there is room for improvement not that this is split off from AF_Pump.

- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: AbilityFactory TODO list
by friarsol » 28 Jun 2011, 12:20
I think we should change how the options work for Protection. The first parameter would be "Gains" or some such, and this would be a list of Colors (or any other type of protection). If it's listed as "Choice" then there also will be a "Choices" parameter with a comma-delimited list to choose from. This would allow us to more easily give access to things that are Colors or Artifacts. We can probably have Choices allow for "Colors" which will basically expand to all 5 the Colors.slapshot5 wrote:That's what lunch breaks are for.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: AbilityFactory TODO list
by slapshot5 » 28 Jun 2011, 12:30
Yeah, I just wanted to get it working as close to AF_Pump as I could to start. It's much less daunting for people to tweak it than add the whole AF.friarsol wrote:I think we should change how the options work for Protection. The first parameter would be "Gains" or some such, and this would be a list of Colors (or any other type of protection). If it's listed as "Choice" then there also will be a "Choices" parameter with a comma-delimited list to choose from. This would allow us to more easily give access to things that are Colors or Artifacts. We can probably have Choices allow for "Colors" which will basically expand to all 5 the Colors.
I thought there was a card somewhere where it could get protection from a choice of 1 of 4 of the 5 colors, and I wasn't sure about the best way to work that in. But that should work pretty well with Gains and Choice parameters.
The AI combat checks need lots of work too:
1) checking for specific colors to gain protection from
2) generalization (or just a different check) for things like "Protection from Dragons" or whatever things there are like that out there.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: AbilityFactory TODO list
by slapshot5 » 29 Jun 2011, 00:22
I've submitted changes to make this so. Choices will accept "AnyColor" to automagically prompt for 1 of the 5 colors. Wiki documentation is on the way.friarsol wrote:I think we should change how the options work for Protection. The first parameter would be "Gains" or some such, and this would be a list of Colors (or any other type of protection). If it's listed as "Choice" then there also will be a "Choices" parameter with a comma-delimited list to choose from. This would allow us to more easily give access to things that are Colors or Artifacts. We can probably have Choices allow for "Colors" which will basically expand to all 5 the Colors.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: AbilityFactory TODO list
by friarsol » 29 Jun 2011, 01:27
Oh good. I'm gonna tweak this slightly to make it easier to allow for AnyColor and something else (like Artifacts).slapshot5 wrote:I've submitted changes to make this so. Choices will accept "AnyColor" to automagically prompt for 1 of the 5 colors. Wiki documentation is on the way.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: AbilityFactory TODO list
by slapshot5 » 29 Jun 2011, 02:56
Do we want to tweak the checks in CardFactoryUtil.hasProtectionFrom(...) to use .equalsIgnoreCase() instead of just equals? Seems like it would cut down errors without affecting functionality. I thought about that more than once when programming this.
-slapshot5
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: AbilityFactory TODO list
by friarsol » 29 Jun 2011, 03:00
Yea ignoring case there is probably the better way to go. Although case sensitivity does matter for the Protection keywords, so we just have to be careful about that.slapshot5 wrote:Do we want to tweak the checks in CardFactoryUtil.hasProtectionFrom(...) to use .equalsIgnoreCase() instead of just equals? Seems like it would cut down errors without affecting functionality. I thought about that more than once when programming this.
It seems like Subtypes (Dragons, Goblins) are upper case, and everything else is lower case.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: AbilityFactory TODO list
by slapshot5 » 29 Jun 2011, 03:21
My biggest concern was regarding colors. Most other places in text files (and AFs in particular) use a capitalized color. That would fail in AF_Protection unless we handled colors specifically with a toLowerCase() or whatever it's called.friarsol wrote:It seems like Subtypes (Dragons, Goblins) are upper case, and everything else is lower case.
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Who is online
Users browsing this forum: No registered users and 24 guests