AACloner & AACopier TokenAndAbility
if the token has andAbility, the cloner/copier also has that andAbility also...
This commit is contained in:
@@ -3692,6 +3692,8 @@ public:
|
||||
//andability
|
||||
if(andAbility)
|
||||
{
|
||||
//backup andAbility for copier and cloner
|
||||
spell->source->TokenAndAbility = andAbility->clone();
|
||||
MTGAbility * andAbilityClone = andAbility->clone();
|
||||
andAbilityClone->target = spell->source;
|
||||
if(andAbility->oneShot)
|
||||
|
||||
@@ -121,6 +121,7 @@ public:
|
||||
MTGGameZone * previousZone;
|
||||
MTGCardInstance * previous;
|
||||
MTGCardInstance * next;
|
||||
MTGAbility * TokenAndAbility;
|
||||
int doDamageTest;
|
||||
bool skipDamageTestOnce;
|
||||
int summoningSickness;
|
||||
|
||||
@@ -1503,6 +1503,20 @@ int AACopier::resolve()
|
||||
source->basicAbilities.reset();
|
||||
source->getManaCost()->resetCosts();
|
||||
}
|
||||
if(_target->TokenAndAbility)
|
||||
{//the source copied a token with andAbility
|
||||
MTGAbility * andAbilityClone = _target->TokenAndAbility->clone();
|
||||
andAbilityClone->target = source;
|
||||
if(_target->TokenAndAbility->oneShot)
|
||||
{
|
||||
andAbilityClone->resolve();
|
||||
SAFE_DELETE(andAbilityClone);
|
||||
}
|
||||
else
|
||||
{
|
||||
andAbilityClone->addToGame();
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -3971,6 +3985,20 @@ int AACloner::resolve()
|
||||
if(_target->model->data->basicAbilities[k])
|
||||
spell->source->basicAbilities[k] = _target->model->data->basicAbilities[k];
|
||||
}
|
||||
if(_target->TokenAndAbility)
|
||||
{//the source copied a token with andAbility
|
||||
MTGAbility * andAbilityClone = _target->TokenAndAbility->clone();
|
||||
andAbilityClone->target = spell->source;
|
||||
if(_target->TokenAndAbility->oneShot)
|
||||
{
|
||||
andAbilityClone->resolve();
|
||||
SAFE_DELETE(andAbilityClone);
|
||||
}
|
||||
else
|
||||
{
|
||||
andAbilityClone->addToGame();
|
||||
}
|
||||
}
|
||||
delete spell;
|
||||
}
|
||||
return 1;
|
||||
|
||||
@@ -265,6 +265,7 @@ void MTGCardInstance::initMTGCI()
|
||||
previousZone = NULL;
|
||||
previous = NULL;
|
||||
next = NULL;
|
||||
TokenAndAbility = NULL;
|
||||
lastController = NULL;
|
||||
regenerateTokens = 0;
|
||||
blocked = false;
|
||||
|
||||
Reference in New Issue
Block a user