converted ifthenability into an activatedabilty from mtgability so that it can be targeted without the use of workarounds...
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user