just moved a bracket in ai STANDARD_LEVELUP. the 3 condiational was outside of the bracket, causing it to over ride previous. it should ALWAYS consider the "maxlevel" hint.

This commit is contained in:
omegablast2002@yahoo.com
2010-12-13 14:58:24 +00:00
parent 1046ffac02
commit 448099825a
+18 -18
View File
@@ -352,26 +352,26 @@ int AIAction::getEfficiency()
} }
} }
if (currentlevel < _target->MaxLevelUp) if (currentlevel < _target->MaxLevelUp)
{ {
efficiency = 85; efficiency = 85;
//increase the efficeincy of leveling up by a small amount equal to current level. //increase the efficeincy of leveling up by a small amount equal to current level.
efficiency += currentlevel; efficiency += currentlevel;
}
if (p->game->hand->nb_cards > 0 && p->isAI()) if (p->game->hand->nb_cards > 0 && p->isAI())
{ {
efficiency -= (10 * p->game->hand->nb_cards);//reduce the eff if by 10 times the amount of cards in Ais hand. efficiency -= (10 * p->game->hand->nb_cards);//reduce the eff if by 10 times the amount of cards in Ais hand.
//it should always try playing more cards before deciding //it should always try playing more cards before deciding
} }
if (g->getCurrentGamePhase() == Constants::MTG_PHASE_SECONDMAIN) if (g->getCurrentGamePhase() == Constants::MTG_PHASE_SECONDMAIN)
{ {
efficiency = 100; efficiency = 100;
//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::STANDARD_PUMP: case MTGAbility::STANDARD_PUMP:
{ {
MTGCardInstance * _target = (MTGCardInstance *) (a->target); MTGCardInstance * _target = (MTGCardInstance *) (a->target);