last adjustment for today, promise...Ai will now use tappers/untappers religously based on card ranking.

This commit is contained in:
omegablast2002@yahoo.com
2010-11-27 20:47:34 +00:00
parent 0dae942cd0
commit 62e1dfa0d0
+8 -6
View File
@@ -459,21 +459,23 @@ int AIAction::getEfficiency()
{ {
efficiency = 0; efficiency = 0;
MTGCardInstance * _target = (MTGCardInstance *) (a->target); MTGCardInstance * _target = (MTGCardInstance *) (a->target);
if (_target && _target->isTapped() && p->isAI() && p == _target->controller()) if (_target && target->isTapped() && target->controller()->isAI())
{ {
efficiency = 100; efficiency = (20 * target->DangerRanking());
} }
break; break;
} }
case MTGAbility::TAPPER: case MTGAbility::TAPPER:
//tap things the player owns and that are untapped. //tap things the player owns and that are untapped.
{ {
efficiency = 0;
MTGCardInstance * _target = (MTGCardInstance *) (a->target); MTGCardInstance * _target = (MTGCardInstance *) (a->target);
if (_target && !_target->isTapped() && p != _target->controller()) if (_target && !target->controller()->isAI())
{ {
efficiency = 100; efficiency = (20 * target->DangerRanking());
}
if(target->isTapped())
{
efficiency = 0;
} }
break; break;
} }