diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 21d0ccba5..bfb859b37 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -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; } }