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
|
if (destZone == game->players[i]->game->inPlay && fromZone != game->players[i]->game->inPlay && fromZone
|
||||||
!= game->players[i]->opponent()->game->inPlay)
|
!= game->players[i]->opponent()->game->inPlay)
|
||||||
{
|
{
|
||||||
MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp);
|
if(_target->hasSubtype(Subtypes::TYPE_AURA) && destZone == game->players[i]->game->inPlay)
|
||||||
Spell * spell = NEW Spell(game, copy);
|
{//put into play aura if there is no valid targets then it will be in its current zone
|
||||||
spell->resolve();
|
MTGAbility *a = NEW AACastCard(game, game->mLayers->actionLayer()->getMaxId(), _target, _target,false,false,false,"","Put in play",false,true);
|
||||||
if(andAbility)
|
a->oneShot = false;
|
||||||
{
|
a->canBeInterrupted = false;
|
||||||
MTGAbility * andAbilityClone = andAbility->clone();
|
a->addToGame();
|
||||||
andAbilityClone->target = spell->source;
|
if(andAbility)
|
||||||
if(andAbility->oneShot)
|
|
||||||
{
|
{
|
||||||
andAbilityClone->resolve();
|
MTGAbility * andAbilityClone = andAbility->clone();
|
||||||
SAFE_DELETE(andAbilityClone);
|
andAbilityClone->target = _target->next;
|
||||||
}
|
if(andAbility->oneShot)
|
||||||
else
|
{
|
||||||
{
|
andAbilityClone->resolve();
|
||||||
andAbilityClone->addToGame();
|
SAFE_DELETE(andAbilityClone);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
andAbilityClone->addToGame();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(persist)
|
else
|
||||||
spell->source->counters->addCounter(-1,-1);
|
{
|
||||||
if(undying)
|
MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp);
|
||||||
spell->source->counters->addCounter(1,1);
|
Spell * spell = NEW Spell(game, copy);
|
||||||
delete spell;
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user