converted ifthenability into an activatedabilty from mtgability so that it can be targeted without the use of workarounds...

This commit is contained in:
omegablast2002@yahoo.com
2011-11-05 23:47:43 +00:00
parent e4117212cb
commit b0cb955c53
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -850,7 +850,7 @@ public:
Generic classes Generic classes
*/ */
//if/ifnot Cond then EFFECT //if/ifnot Cond then EFFECT
class IfThenAbility: public MTGAbility class IfThenAbility: public ActivatedAbility
{ {
public: public:
MTGAbility * delayedAbility; MTGAbility * delayedAbility;
+4 -3
View File
@@ -2137,8 +2137,9 @@ AAWinGame * AAWinGame::clone() const
//IfThenEffect //IfThenEffect
IfThenAbility::IfThenAbility(GameObserver* observer, int _id, MTGAbility * delayedAbility, MTGCardInstance * _source, Targetable * _target, int type,string Cond) : IfThenAbility::IfThenAbility(GameObserver* observer, int _id, MTGAbility * delayedAbility, MTGCardInstance * _source, Targetable * _target, int type,string Cond) :
MTGAbility(observer, _id, _source,_target),delayedAbility(delayedAbility), type(type),Cond(Cond) ActivatedAbility(observer, _id, _source),delayedAbility(delayedAbility), type(type),Cond(Cond)
{ {
target = _target;
} }
int IfThenAbility::resolve() int IfThenAbility::resolve()
@@ -2156,8 +2157,8 @@ int IfThenAbility::resolve()
TargetChooserFactory tcf(game); TargetChooserFactory tcf(game);
condTc = tcf.createTargetChooser(splitTarget[1], source); condTc = tcf.createTargetChooser(splitTarget[1], source);
condTc->targetter = NULL; condTc->targetter = NULL;
if(source->target) if(aTarget)
checkCond = condTc->canTarget(source->target); checkCond = condTc->canTarget(aTarget);
SAFE_DELETE(condTc); SAFE_DELETE(condTc);
} }