Persist and Undying goes to the stack

This commit is contained in:
Anthony Calosa
2015-10-20 21:56:49 +08:00
parent ae4d245232
commit 2178018b18
3 changed files with 24 additions and 9 deletions

View File

@@ -2734,8 +2734,8 @@ AInstantCastRestrictionUEOT::~AInstantCastRestrictionUEOT()
//AAMover
AAMover::AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string dest,string newName, ManaCost * _cost) :
ActivatedAbility(observer, _id, _source, _cost, 0), destination(dest),named(newName)
AAMover::AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string dest,string newName, ManaCost * _cost, bool undying, bool persist) :
ActivatedAbility(observer, _id, _source, _cost, 0), destination(dest),named(newName),undying(undying),persist(persist)
{
if (_target)
target = _target;
@@ -2782,6 +2782,10 @@ int AAMover::resolve()
andAbilityClone->addToGame();
}
}
if(persist)
spell->source->counters->addCounter(-1,-1);
if(undying)
spell->source->counters->addCounter(1,1);
delete spell;
return 1;
}