Fix for Aura's that are put into play
This commit is contained in:
@@ -3013,28 +3013,52 @@ int AAMover::resolve()
|
||||
if (destZone == game->players[i]->game->inPlay && fromZone != game->players[i]->game->inPlay && fromZone
|
||||
!= game->players[i]->opponent()->game->inPlay)
|
||||
{
|
||||
MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp);
|
||||
Spell * spell = NEW Spell(game, copy);
|
||||
spell->resolve();
|
||||
if(andAbility)
|
||||
{
|
||||
MTGAbility * andAbilityClone = andAbility->clone();
|
||||
andAbilityClone->target = spell->source;
|
||||
if(andAbility->oneShot)
|
||||
if(_target->hasSubtype(Subtypes::TYPE_AURA) && destZone == game->players[i]->game->inPlay)
|
||||
{//put into play aura if there is no valid targets then it will be in its current zone
|
||||
MTGAbility *a = NEW AACastCard(game, game->mLayers->actionLayer()->getMaxId(), _target, _target,false,false,false,"","Put in play",false,true);
|
||||
a->oneShot = false;
|
||||
a->canBeInterrupted = false;
|
||||
a->addToGame();
|
||||
if(andAbility)
|
||||
{
|
||||
andAbilityClone->resolve();
|
||||
SAFE_DELETE(andAbilityClone);
|
||||
}
|
||||
else
|
||||
{
|
||||
andAbilityClone->addToGame();
|
||||
MTGAbility * andAbilityClone = andAbility->clone();
|
||||
andAbilityClone->target = _target->next;
|
||||
if(andAbility->oneShot)
|
||||
{
|
||||
andAbilityClone->resolve();
|
||||
SAFE_DELETE(andAbilityClone);
|
||||
}
|
||||
else
|
||||
{
|
||||
andAbilityClone->addToGame();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(persist)
|
||||
spell->source->counters->addCounter(-1,-1);
|
||||
if(undying)
|
||||
spell->source->counters->addCounter(1,1);
|
||||
delete spell;
|
||||
else
|
||||
{
|
||||
MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp);
|
||||
Spell * spell = NEW Spell(game, copy);
|
||||
spell->resolve();
|
||||
if(andAbility)
|
||||
{
|
||||
MTGAbility * andAbilityClone = andAbility->clone();
|
||||
andAbilityClone->target = spell->source;
|
||||
if(andAbility->oneShot)
|
||||
{
|
||||
andAbilityClone->resolve();
|
||||
SAFE_DELETE(andAbilityClone);
|
||||
}
|
||||
else
|
||||
{
|
||||
andAbilityClone->addToGame();
|
||||
}
|
||||
}
|
||||
if(persist)
|
||||
spell->source->counters->addCounter(-1,-1);
|
||||
if(undying)
|
||||
spell->source->counters->addCounter(1,1);
|
||||
delete spell;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user