2017-10-06 16:06:45 +01:00
|
|
|
#ifndef GUARD_BATTLE_SCRIPT_COMMANDS_H
|
|
|
|
#define GUARD_BATTLE_SCRIPT_COMMANDS_H
|
|
|
|
|
2020-07-17 01:12:12 +01:00
|
|
|
#include "constants/pokemon.h"
|
|
|
|
|
2017-10-22 00:04:02 +01:00
|
|
|
#define WINDOW_CLEAR 0x1
|
|
|
|
#define WINDOW_x80 0x80
|
|
|
|
|
2020-12-13 22:02:21 +00:00
|
|
|
struct StatFractions
|
|
|
|
{
|
|
|
|
u8 dividend;
|
|
|
|
u8 divisor;
|
|
|
|
};
|
|
|
|
|
2018-07-23 20:36:05 +01:00
|
|
|
s32 CalcCritChanceStage(u8 battlerAtk, u8 battlerDef, u32 move, bool32 recordAbility);
|
2021-09-22 12:15:43 +01:00
|
|
|
s8 GetInverseCritChance(u8 battlerAtk, u8 battlerDef, u32 move);
|
2020-04-20 12:00:04 +01:00
|
|
|
u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move);
|
2018-02-27 17:13:28 +00:00
|
|
|
u8 GetBattlerTurnOrderNum(u8 battlerId);
|
2019-08-22 14:57:33 +01:00
|
|
|
bool32 NoAliveMonsForEitherParty(void);
|
2019-02-14 12:17:27 +00:00
|
|
|
void SetMoveEffect(bool32 primary, u32 certain);
|
2020-04-18 17:04:20 +01:00
|
|
|
bool32 CanBattlerSwitch(u32 battlerId);
|
2017-10-21 16:32:35 +01:00
|
|
|
void BattleDestroyYesNoCursorAt(u8 cursorPosition);
|
|
|
|
void BattleCreateYesNoCursorAt(u8 cursorPosition);
|
2017-10-06 16:06:45 +01:00
|
|
|
void BufferMoveToLearnIntoBattleTextBuff2(void);
|
2017-10-22 00:04:02 +01:00
|
|
|
void HandleBattleWindow(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags);
|
2018-02-27 17:13:28 +00:00
|
|
|
bool8 UproarWakeUpCheck(u8 battlerId);
|
2018-08-02 19:24:18 +01:00
|
|
|
bool32 DoesSubstituteBlockMove(u8 battlerAtk, u8 battlerDef, u32 move);
|
2020-02-08 18:29:51 +00:00
|
|
|
bool32 DoesDisguiseBlockMove(u8 battlerAtk, u8 battlerDef, u32 move);
|
2020-04-21 14:59:19 +01:00
|
|
|
bool32 CanPoisonType(u8 battlerAttacker, u8 battlerTarget);
|
2020-05-28 09:38:27 +01:00
|
|
|
bool32 CanParalyzeType(u8 battlerAttacker, u8 battlerTarget);
|
2018-12-02 22:50:51 +00:00
|
|
|
bool32 CanUseLastResort(u8 battlerId);
|
2019-03-31 20:38:58 +01:00
|
|
|
u32 IsFlowerVeilProtected(u32 battler);
|
2019-12-16 08:29:20 +00:00
|
|
|
u32 IsLeafGuardProtected(u32 battler);
|
2020-04-19 20:18:39 +01:00
|
|
|
bool32 IsShieldsDownProtected(u32 battler);
|
|
|
|
u32 IsAbilityStatusProtected(u32 battler);
|
2021-02-02 16:00:07 +00:00
|
|
|
bool32 TryResetBattlerStatChanges(u8 battler);
|
2020-12-13 22:02:21 +00:00
|
|
|
bool32 CanCamouflage(u8 battlerId);
|
|
|
|
u16 GetNaturePowerMove(void);
|
2021-10-05 01:28:15 +01:00
|
|
|
u16 GetSecretPowerMoveEffect(void);
|
2020-12-09 17:28:18 +00:00
|
|
|
void StealTargetItem(u8 battlerStealer, u8 battlerItem);
|
2021-10-15 21:06:50 +01:00
|
|
|
u8 GetCatchingBattler(void);
|
2017-10-06 16:06:45 +01:00
|
|
|
|
|
|
|
extern void (* const gBattleScriptingCommandsTable[])(void);
|
2020-07-17 01:12:12 +01:00
|
|
|
extern const u8 gBattlePalaceNatureToMoveGroupLikelihood[NUM_NATURES][4];
|
2020-12-13 22:02:21 +00:00
|
|
|
extern const struct StatFractions gAccuracyStageRatios[];
|
2017-10-06 16:06:45 +01:00
|
|
|
|
|
|
|
#endif // GUARD_BATTLE_SCRIPT_COMMANDS_H
|