changed suspend to use castcard.

This commit is contained in:
zethfoxster
2016-07-14 21:25:04 -04:00
parent 9a56817bf8
commit 2fc52c9abd
+8 -4
View File
@@ -2,6 +2,7 @@
#include "Counters.h" #include "Counters.h"
#include "MTGCardInstance.h" #include "MTGCardInstance.h"
#include "AllAbilities.h"
Counter::Counter(MTGCardInstance * _target, int _power, int _toughness) Counter::Counter(MTGCardInstance * _target, int _power, int _toughness)
{ {
@@ -187,10 +188,13 @@ int Counters::removeCounter(const char * _name, int _power, int _toughness)
if (target->suspended && !target->counters->hasCounter("time",0,0)) if (target->suspended && !target->counters->hasCounter("time",0,0))
{ {
GameObserver * game = target->getObserver(); GameObserver * game = target->getObserver();
MTGCardInstance * copy = target->controller()->game->putInZone(target, target->currentZone, target->controller()->game->stack); MTGAbility *ac = NEW AACastCard(game, game->mLayers->actionLayer()->getMaxId(), target, target, false, false, true, "", "", false, false);
MayAbility *ma1 = NEW MayAbility(game, game->mLayers->actionLayer()->getMaxId(), ac->clone(), target, true);
game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL,1, 0); MTGAbility *ga1 = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), target, NULL, ma1->clone());
game->targetChooser = NULL; SAFE_DELETE(ac);
SAFE_DELETE(ma1);
ga1->resolve();
SAFE_DELETE(ga1);
} }
return mCount; return mCount;
} }