fix default wild ai flag logic

This commit is contained in:
ghoulslash 2021-07-27 09:53:47 -06:00
parent 0a0687ae78
commit 3dcfc0fc12

View file

@ -132,13 +132,12 @@ static u32 GetWildAiFlags(void)
if (IsDoubleBattle())
avgLevel = (GetMonData(&gEnemyParty[0], MON_DATA_LEVEL) + GetMonData(&gEnemyParty[1], MON_DATA_LEVEL)) / 2;
if (avgLevel < 20)
flags |= AI_FLAG_CHECK_BAD_MOVE;
if (avgLevel < 40)
if (avgLevel >= 20)
flags |= AI_FLAG_CHECK_VIABILITY;
if (avgLevel < 60)
if (avgLevel >= 60)
flags |= AI_FLAG_PREFER_STRONGEST_MOVE;
if (avgLevel < 100)
if (avgLevel >= 80)
flags |= AI_FLAG_HP_AWARE;
if (B_VAR_WILD_AI_FLAGS != 0 && VarGet(B_VAR_WILD_AI_FLAGS) != 0)