diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-10-04 17:55:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-04 17:55:20 -0500 |
commit | f044c8215b9d44f19ad90a43e9e0f4263a828254 (patch) | |
tree | e2fa5828e97a76d109276ed1d144e14cbce88f56 /include/constants/battle_ai.h | |
parent | 4880b33ff2cff769a7c9bc73c9d792b40c10fbf7 (diff) | |
parent | 621cfbebee08dfd856a4e5a6164b9f27bcdbbadd (diff) |
Merge pull request #9 from ProjectRevoTPP/battle_ai
decompile battle_ai_script_commands.c
Diffstat (limited to 'include/constants/battle_ai.h')
-rw-r--r-- | include/constants/battle_ai.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/constants/battle_ai.h b/include/constants/battle_ai.h new file mode 100644 index 000000000..4c3a45dc6 --- /dev/null +++ b/include/constants/battle_ai.h @@ -0,0 +1,52 @@ +#ifndef GUARD_CONSTANTS_BATTLE_AI_H +#define GUARD_CONSTANTS_BATTLE_AI_H + +// battlers +#define AI_TARGET 0 +#define AI_USER 1 +#define AI_TARGET_PARTNER 2 +#define AI_USER_PARTNER 3 + +// get_type command +#define AI_TYPE1_TARGET 0 +#define AI_TYPE1_USER 1 +#define AI_TYPE2_TARGET 2 +#define AI_TYPE2_USER 3 +#define AI_TYPE_MOVE 4 + +// type effectiveness +#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 0 + +// ai weather +#define AI_WEATHER_SUN 0 +#define AI_WEATHER_RAIN 1 +#define AI_WEATHER_SANDSTORM 2 +#define AI_WEATHER_HAIL 3 + +// get_how_powerful_move_is +#define MOVE_POWER_DISCOURAGED 0 +#define MOVE_NOT_MOST_POWERFUL 1 +#define MOVE_MOST_POWERFUL 2 + +// script's table id to bit +#define AI_SCRIPT_CHECK_BAD_MOVE (1 << 0) +#define AI_SCRIPT_TRY_TO_FAINT (1 << 1) +#define AI_SCRIPT_CHECK_VIABILITY (1 << 2) +#define AI_SCRIPT_SETUP_FIRST_TURN (1 << 3) +#define AI_SCRIPT_RISKY (1 << 4) +#define AI_SCRIPT_PREFER_STRONGEST_MOVE (1 << 5) +#define AI_SCRIPT_PREFER_BATON_PASS (1 << 6) +#define AI_SCRIPT_DOUBLE_BATTLE (1 << 7) +#define AI_SCRIPT_HP_AWARE (1 << 8) +#define AI_SCRIPT_UNKNOWN (1 << 9) +// 10 - 28 are not used +#define AI_SCRIPT_ROAMING (1 << 29) +#define AI_SCRIPT_SAFARI (1 << 30) +#define AI_SCRIPT_FIRST_BATTLE (1 << 31) + +#endif // GUARD_CONSTANTS_BATTLE_AI_H |