From fac6f21ed007c09dc09f2174874e690651a09c7d Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Sun, 3 Jul 2022 16:28:34 -0400 Subject: [PATCH] AI_EFFECTIVENESS_xY are enums --- include/constants/battle_ai.h | 14 +++++++------- src/battle_ai_main.c | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/constants/battle_ai.h b/include/constants/battle_ai.h index 67f5c11b8e..d48827683a 100644 --- a/include/constants/battle_ai.h +++ b/include/constants/battle_ai.h @@ -15,13 +15,13 @@ #define AI_TYPE_MOVE 4 // type effectiveness -#define AI_EFFECTIVENESS_x8 320 -#define AI_EFFECTIVENESS_x4 160 -#define AI_EFFECTIVENESS_x2 80 -#define AI_EFFECTIVENESS_x1 40 -#define AI_EFFECTIVENESS_x0_5 20 -#define AI_EFFECTIVENESS_x0_25 10 -#define AI_EFFECTIVENESS_x0_125 5 +#define AI_EFFECTIVENESS_x8 7 +#define AI_EFFECTIVENESS_x4 6 +#define AI_EFFECTIVENESS_x2 5 +#define AI_EFFECTIVENESS_x1 4 +#define AI_EFFECTIVENESS_x0_5 3 +#define AI_EFFECTIVENESS_x0_25 2 +#define AI_EFFECTIVENESS_x0_125 1 #define AI_EFFECTIVENESS_x0 0 // ai weather diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 9840c48275..7350c9b03f 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -274,6 +274,7 @@ void GetAiLogicData(void) || !IsBattlerAIControlled(battlerAtk)) { continue; } + for (battlerDef = 0; battlerDef < gBattlersCount; battlerDef++) { if (battlerAtk == battlerDef)