Overlooked this

Should be fine now, reverted the test
This commit is contained in:
Anthony Calosa
2016-06-18 21:20:30 +08:00
parent f57bba22cc
commit a73030ac9b
+25 -25
View File
@@ -3010,31 +3010,8 @@ int AAMover::resolve()
//inplay is a special zone ! //inplay is a special zone !
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
{ {
if (destZone == game->players[i]->game->inPlay && fromZone != game->players[i]->game->inPlay && fromZone if (!_target->hasSubtype(Subtypes::TYPE_AURA) && 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)
{
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)
{
MTGAbility * andAbilityClone = andAbility->clone();
andAbilityClone->target = _target->next;
if(andAbility->oneShot)
{
andAbilityClone->resolve();
SAFE_DELETE(andAbilityClone);
}
else
{
andAbilityClone->addToGame();
}
}
}
else
{ {
MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp); MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp);
Spell * spell = NEW Spell(game, copy); Spell * spell = NEW Spell(game, copy);
@@ -3058,10 +3035,32 @@ int AAMover::resolve()
if(undying) if(undying)
spell->source->counters->addCounter(1,1); spell->source->counters->addCounter(1,1);
delete spell; delete spell;
}
return 1; return 1;
} }
} }
if(_target->hasSubtype(Subtypes::TYPE_AURA) && (destZone == game->players[0]->game->inPlay || destZone == game->players[1]->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 && _target->next)
{//if successful target->next should be valid
MTGAbility * andAbilityClone = andAbility->clone();
andAbilityClone->target = _target->next;
if(andAbility->oneShot)
{
andAbilityClone->resolve();
SAFE_DELETE(andAbilityClone);
}
else
{
andAbilityClone->addToGame();
}
}
}
else
{
p->game->putInZone(_target, fromZone, destZone); p->game->putInZone(_target, fromZone, destZone);
while(_target->next) while(_target->next)
_target = _target->next; _target = _target->next;
@@ -3079,6 +3078,7 @@ int AAMover::resolve()
andAbilityClone->addToGame(); andAbilityClone->addToGame();
} }
} }
}
return 1; return 1;
} }
} }