sovereignx/include/battle_ai_main.h

59 lines
1.6 KiB
C
Raw Normal View History

2020-12-20 21:47:20 +00:00
#ifndef GUARD_BATTLE_AI_MAIN_H
#define GUARD_BATTLE_AI_MAIN_H
2017-09-05 08:41:48 +01:00
// return vals for BattleAI_ChooseMoveOrAction
2018-06-17 15:48:58 +01:00
// 0 - 3 are move idx
2021-11-28 18:12:56 +00:00
#define AI_CHOICE_FLEE 4
#define AI_CHOICE_WATCH 5
#define AI_CHOICE_SWITCH 7
2018-06-17 15:48:58 +01:00
#include "test_runner.h"
// Logs for debugging AI tests.
#define SET_SCORE(battler, movesetIndex, val) \
do \
{ \
TestRunner_Battle_AISetScore(__FILE__, __LINE__, battler, movesetIndex, val); \
AI_THINKING_STRUCT->score[movesetIndex] = val; \
} while (0) \
#define ADJUST_SCORE(val) \
do \
{ \
TestRunner_Battle_AIAdjustScore(__FILE__, __LINE__, sBattler_AI, AI_THINKING_STRUCT->movesetIndex, val); \
score += val; \
} while (0) \
#define ADJUST_SCORE_PTR(val) \
do \
{ \
TestRunner_Battle_AIAdjustScore(__FILE__, __LINE__, sBattler_AI, AI_THINKING_STRUCT->movesetIndex, val); \
(*score) += val; \
} while (0) \
#define RETURN_SCORE_PLUS(val) \
{ \
ADJUST_SCORE(val); \
return score; \
}
#define RETURN_SCORE_MINUS(val) \
{ \
ADJUST_SCORE(-val); \
return score; \
}
2023-09-13 23:07:41 +01:00
u32 ComputeBattleAiScores(u32 battler);
void BattleAI_SetupItems(void);
void BattleAI_SetupFlags(void);
2023-08-30 09:18:31 +01:00
void BattleAI_SetupAIData(u8 defaultScoreMoves, u32 battler);
2023-09-13 23:07:41 +01:00
u32 BattleAI_ChooseMoveOrAction(void);
2022-08-23 00:07:25 +01:00
void Ai_InitPartyStruct(void);
void Ai_UpdateSwitchInData(u32 battler);
2022-08-23 10:58:17 +01:00
void Ai_UpdateFaintData(u32 battler);
2023-09-13 16:28:26 +01:00
void SetAiLogicDataForTurn(struct AiLogicData *aiData);
2017-09-05 08:41:48 +01:00
2020-12-11 15:05:00 +00:00
extern u8 sBattler_AI;
2020-12-20 21:47:20 +00:00
#endif // GUARD_BATTLE_AI_MAIN_H