- Add a simple macro system for auto lines (the goal is to help mostly with repetitive card auto lines such as the ones we have in MotD mod) Check the MotD mod for examples.
-- I added an AbilityParser.cpp file, mid term goal is to move AbilityFactory there, so that MTGAbility.cpp becomes a bit less big. -- I tried to add the file reference in Makefiles, but only tested windows compilation so far - Fixed bugs related to "castRestriction" variables in MTGAbility. these variables were declared in both the parent and children classes, leading to bugs and duplicate code/content The test suite passes
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
//Generic Activated Abilities
|
||||
GenericActivatedAbility::GenericActivatedAbility(GameObserver* observer, string newName, string castRestriction, int _id, MTGCardInstance * card, MTGAbility * a, ManaCost * _cost,
|
||||
string limit,MTGAbility * sideEffects,string usesBeforeSideEffects, int restrictions, MTGGameZone * dest) :
|
||||
ActivatedAbility(observer, _id, card, _cost, restrictions,limit,sideEffects,usesBeforeSideEffects,castRestriction), NestedAbility(a), activeZone(dest),newName(newName),castRestriction(castRestriction)
|
||||
ActivatedAbility(observer, _id, card, _cost, restrictions,limit,sideEffects,usesBeforeSideEffects,castRestriction), NestedAbility(a), activeZone(dest),newName(newName)
|
||||
{
|
||||
counters = 0;
|
||||
target = ability->target;
|
||||
@@ -2486,9 +2486,9 @@ MultiAbility::~MultiAbility()
|
||||
}
|
||||
|
||||
//Generic Target Ability
|
||||
GenericTargetAbility::GenericTargetAbility(GameObserver* observer, string newName, string castRestriction,int _id, MTGCardInstance * _source, TargetChooser * _tc, MTGAbility * a,
|
||||
GenericTargetAbility::GenericTargetAbility(GameObserver* observer, string newName, string castRestriction, int _id, MTGCardInstance * _source, TargetChooser * _tc, MTGAbility * a,
|
||||
ManaCost * _cost, string limit,MTGAbility * sideEffects,string usesBeforeSideEffects, int restrictions, MTGGameZone * dest) :
|
||||
TargetAbility(observer, _id, _source, _tc, _cost, restrictions,castRestriction), limit(limit), activeZone(dest),newName(newName),castRestriction(castRestriction)
|
||||
TargetAbility(observer, _id, _source, _tc, _cost, restrictions, castRestriction), limit(limit), activeZone(dest),newName(newName)
|
||||
{
|
||||
ability = a;
|
||||
MTGAbility * core = AbilityFactory::getCoreAbility(a);
|
||||
|
||||
Reference in New Issue
Block a user