castcard generated card

This commit is contained in:
Anthony Calosa
2017-02-16 17:10:06 +08:00
parent 0a68a056d8
commit da874738d6
+19 -1
View File
@@ -8115,12 +8115,30 @@ int AACastCard::resolveSpell()
{ {
if (_target->isLand()) if (_target->isLand())
{ {
MTGCardInstance * copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield,noEvent); if(theNamedCard)
{
MTGCardInstance * copy = _target->controller()->game->putInZone(_target, _target->currentZone, _target->controller()->game->temp);
copy->changeController(source->controller(),true); copy->changeController(source->controller(),true);
Spell * spell = NEW Spell(game, 0,copy,NULL,NULL, 1);
spell->resolve();
delete spell;
this->forceDestroy = true; this->forceDestroy = true;
processed = true; processed = true;
return 1; return 1;
} }
else
{
MTGAbility * a = NEW AAMover(game, -1, source, _target, "mybattlefield", "");
a->oneShot = true;
a->resolve();
SAFE_DELETE(a);
this->forceDestroy = true;
processed = true;
return 1;
}
}
Spell * spell = NULL; Spell * spell = NULL;
MTGCardInstance * copy = NULL; MTGCardInstance * copy = NULL;