bracket around wrong section sorry! ai now again uses level up the way it was taught before.

This commit is contained in:
omegablast2002@yahoo.com
2011-04-25 14:32:47 +00:00
parent 071facd43d
commit cf46404ed1
+4 -2
View File
@@ -388,7 +388,7 @@ int AIAction::getEfficiency()
} }
case MTGAbility::STANDARD_LEVELUP: case MTGAbility::STANDARD_LEVELUP:
{ {
MTGCardInstance * _target = (MTGCardInstance *) target; MTGCardInstance * _target = (MTGCardInstance *) (a->target);
efficiency = 0; efficiency = 0;
Counter * targetCounter = NULL; Counter * targetCounter = NULL;
int currentlevel = 0; int currentlevel = 0;
@@ -400,7 +400,6 @@ int AIAction::getEfficiency()
targetCounter = _target->counters->hasCounter("level", 0, 0); targetCounter = _target->counters->hasCounter("level", 0, 0);
currentlevel = targetCounter->nb; currentlevel = targetCounter->nb;
} }
}
if (currentlevel < _target->MaxLevelUp) if (currentlevel < _target->MaxLevelUp)
{ {
efficiency = 85; efficiency = 85;
@@ -419,11 +418,14 @@ int AIAction::getEfficiency()
//in 2nd main, go all out and try to max stuff. //in 2nd main, go all out and try to max stuff.
} }
} }
}
break; break;
} }
case MTGAbility::COUNTERS: case MTGAbility::COUNTERS:
{ {
MTGCardInstance * _target = (MTGCardInstance *) target; MTGCardInstance * _target = (MTGCardInstance *) target;
if(!_target)
_target = (MTGCardInstance *) (a->target);
efficiency = 0; efficiency = 0;
if(AACounter * cc = dynamic_cast<AACounter*> (a)) if(AACounter * cc = dynamic_cast<AACounter*> (a))
{ {