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

View File

@@ -850,7 +850,7 @@ public:
Generic classes
*/
//if/ifnot Cond then EFFECT
class IfThenAbility: public MTGAbility
class IfThenAbility: public ActivatedAbility
{
public:
MTGAbility * delayedAbility;

View File

@@ -2137,8 +2137,9 @@ AAWinGame * AAWinGame::clone() const
//IfThenEffect
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()
@@ -2156,8 +2157,8 @@ int IfThenAbility::resolve()
TargetChooserFactory tcf(game);
condTc = tcf.createTargetChooser(splitTarget[1], source);
condTc->targetter = NULL;
if(source->target)
checkCond = condTc->canTarget(source->target);
if(aTarget)
checkCond = condTc->canTarget(aTarget);
SAFE_DELETE(condTc);
}