add AACloner andAbility
This commit is contained in:
@@ -2021,6 +2021,7 @@ public:
|
||||
list<int> awith;
|
||||
list<int> colors;
|
||||
list<int> typesToAdd;
|
||||
MTGAbility * andAbility;
|
||||
|
||||
AACloner(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target = NULL, ManaCost * _cost = NULL, int who = 0,
|
||||
string abilitiesStringList = "",string typeslist = "");
|
||||
|
||||
@@ -3939,7 +3939,7 @@ AACloner::AACloner(GameObserver* observer, int _id, MTGCardInstance * _source, M
|
||||
{
|
||||
PopulateSubtypesIndexVector(typesToAdd,TypesList);
|
||||
}
|
||||
|
||||
andAbility = NULL;
|
||||
}
|
||||
|
||||
int AACloner::resolve()
|
||||
@@ -4012,9 +4012,23 @@ int AACloner::resolve()
|
||||
}
|
||||
if(_target->TokenAndAbility)
|
||||
{//the source copied a token with andAbility
|
||||
MTGAbility * andAbilityClone = _target->TokenAndAbility->clone();
|
||||
andAbilityClone->target = spell->source;
|
||||
MTGAbility * TokenandAbilityClone = _target->TokenAndAbility->clone();
|
||||
TokenandAbilityClone->target = spell->source;
|
||||
if(_target->TokenAndAbility->oneShot)
|
||||
{
|
||||
TokenandAbilityClone->resolve();
|
||||
SAFE_DELETE(TokenandAbilityClone);
|
||||
}
|
||||
else
|
||||
{
|
||||
TokenandAbilityClone->addToGame();
|
||||
}
|
||||
}
|
||||
if(andAbility)
|
||||
{
|
||||
MTGAbility * andAbilityClone = andAbility->clone();
|
||||
andAbilityClone->target = spell->source;
|
||||
if(andAbility->oneShot)
|
||||
{
|
||||
andAbilityClone->resolve();
|
||||
SAFE_DELETE(andAbilityClone);
|
||||
|
||||
Reference in New Issue
Block a user