- Removing Static from Member Variables of AbilityFactory so they are not shared between cards.

- Create a new AbilityFactory for each time AF is used to prevent issues with Factory not being fresh.
- Added AbilityFactory_Counters.java for AFs that deal with putting or removing counters from cards
- Added createAbilityPutCounters for Abilities that put Counters on cards.
- Added Amok, Fume Spitter, and Trigon of Corruption as Samples of using PutCounter
This commit is contained in:
jendave
2011-08-06 08:56:40 +00:00
parent 58fd4d34ae
commit f16b280138
7 changed files with 266 additions and 43 deletions

View File

@@ -6093,14 +6093,14 @@ public class CardFactory implements NewConstants {
// AbilityFactory cards
ArrayList<String> IA = card.getIntrinsicAbilities();
if (IA.size() > 0)
{
AbilityFactory AF = new AbilityFactory();
{
if (card.isInstant() || card.isSorcery())
card.clearSpellAbility();
for (int i=0; i<IA.size(); i++)
for (int i=0; i<IA.size(); i++){
AbilityFactory AF = new AbilityFactory();
card.addSpellAbility(AF.getAbility(IA.get(i), card));
}
}