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