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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user