2018-01-16 23:15:02 +01:00
|
|
|
#ifndef GUARD_BATTLE_MAIN_H
|
|
|
|
#define GUARD_BATTLE_MAIN_H
|
2017-10-06 17:06:45 +02:00
|
|
|
|
2023-02-23 23:14:14 +01:00
|
|
|
#include "pokemon.h"
|
|
|
|
#include "data.h"
|
|
|
|
|
2018-02-26 14:29:17 +01:00
|
|
|
struct TrainerMoney
|
|
|
|
{
|
|
|
|
u8 classId;
|
|
|
|
u8 value;
|
|
|
|
};
|
|
|
|
|
2021-10-04 16:21:03 +02:00
|
|
|
// For displaying a multi battle partner's Pokémon in the party menu
|
|
|
|
struct MultiPartnerMenuPokemon
|
2018-10-12 03:23:39 +02:00
|
|
|
{
|
|
|
|
/*0x00*/ u16 species;
|
|
|
|
/*0x02*/ u16 heldItem;
|
|
|
|
/*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
|
|
|
/*0x0F*/ u8 level;
|
|
|
|
/*0x10*/ u16 hp;
|
|
|
|
/*0x12*/ u16 maxhp;
|
|
|
|
/*0x14*/ u32 status;
|
|
|
|
/*0x18*/ u32 personality;
|
|
|
|
/*0x1C*/ u8 gender;
|
|
|
|
/*0x1D*/ u8 language;
|
|
|
|
};
|
|
|
|
|
2018-06-20 23:07:51 +02:00
|
|
|
// defines for the 'DoBounceEffect' function
|
|
|
|
#define BOUNCE_MON 0x0
|
|
|
|
#define BOUNCE_HEALTHBOX 0x1
|
|
|
|
|
2017-10-06 17:06:45 +02:00
|
|
|
void CB2_InitBattle(void);
|
|
|
|
void BattleMainCB2(void);
|
2017-10-22 18:43:15 +02:00
|
|
|
void CB2_QuitRecordedBattle(void);
|
2017-10-06 17:06:45 +02:00
|
|
|
void VBlankCB_Battle(void);
|
2021-01-23 05:22:37 +01:00
|
|
|
void SpriteCB_VsLetterDummy(struct Sprite *sprite);
|
|
|
|
void SpriteCB_VsLetterInit(struct Sprite *sprite);
|
2021-01-23 02:03:21 +01:00
|
|
|
void CB2_InitEndLinkBattle(void);
|
2021-01-23 05:22:37 +01:00
|
|
|
u32 GetBattleBgTemplateData(u8 arrayId, u8 caseId);
|
|
|
|
u32 GetBattleWindowTemplatePixelWidth(u32 setId, u32 tableId);
|
2022-08-08 04:40:15 +02:00
|
|
|
void SpriteCB_WildMon(struct Sprite *sprite);
|
2017-10-22 18:43:15 +02:00
|
|
|
void SpriteCallbackDummy_2(struct Sprite *sprite);
|
2018-06-20 23:07:51 +02:00
|
|
|
void SpriteCB_FaintOpponentMon(struct Sprite *sprite);
|
2022-08-08 04:40:15 +02:00
|
|
|
void SpriteCB_ShowAsMoveTarget(struct Sprite *sprite);
|
|
|
|
void SpriteCB_HideAsMoveTarget(struct Sprite *sprite);
|
2021-10-04 16:21:03 +02:00
|
|
|
void SpriteCB_OpponentMonFromBall(struct Sprite *sprite);
|
2021-01-23 05:22:37 +01:00
|
|
|
void SpriteCB_BattleSpriteStartSlideLeft(struct Sprite *sprite);
|
2021-01-23 02:03:21 +01:00
|
|
|
void SpriteCB_FaintSlideAnim(struct Sprite *sprite);
|
2022-07-25 20:59:14 +02:00
|
|
|
void DoBounceEffect(u8 battler, u8 which, s8 delta, s8 amplitude);
|
|
|
|
void EndBounceEffect(u8 battler, u8 which);
|
2021-10-04 16:21:03 +02:00
|
|
|
void SpriteCB_PlayerMonFromBall(struct Sprite *sprite);
|
2020-08-30 21:11:44 +02:00
|
|
|
void SpriteCB_TrainerThrowObject(struct Sprite *sprite);
|
2021-11-08 19:18:58 +01:00
|
|
|
void AnimSetCenterToCornerVecX(struct Sprite *sprite);
|
2021-01-22 08:48:22 +01:00
|
|
|
void BeginBattleIntroDummy(void);
|
2017-10-13 17:22:50 +02:00
|
|
|
void BeginBattleIntro(void);
|
2023-08-29 16:20:16 +02:00
|
|
|
void SwitchInClearSetData(u32 battler);
|
|
|
|
void FaintClearSetData(u32 battler);
|
2017-10-22 18:43:15 +02:00
|
|
|
void BattleTurnPassed(void);
|
2023-08-29 16:20:16 +02:00
|
|
|
u8 IsRunningFromBattleImpossible(u32 battler);
|
2023-09-14 11:05:00 +02:00
|
|
|
void SwitchPartyOrder(u32 battlerId);
|
2017-10-22 18:43:15 +02:00
|
|
|
void SwapTurnOrder(u8 id1, u8 id2);
|
2023-09-13 13:23:19 +02:00
|
|
|
u32 GetBattlerTotalSpeedStatArgs(u32 battler, u32 ability, u32 holdEffect);
|
|
|
|
u32 GetBattlerTotalSpeedStat(u32 battler);
|
2019-02-16 14:54:17 +01:00
|
|
|
s8 GetChosenMovePriority(u32 battlerId);
|
|
|
|
s8 GetMovePriority(u32 battlerId, u16 move);
|
2023-09-13 13:23:19 +02:00
|
|
|
u32 GetWhichBattlerFasterArgs(u32 battler1, u32 battler2, bool32 ignoreChosenMoves, u32 ability1, u32 ability2,
|
|
|
|
u32 holdEffectBattler1, u32 holdEffectBattler2, u32 speedBattler1, u32 speedBattler2, s32 priority1, s32 priority2);
|
|
|
|
u32 GetWhichBattlerFaster(u32 battler1, u32 battler2, bool32 ignoreChosenMoves);
|
2017-10-22 18:43:15 +02:00
|
|
|
void RunBattleScriptCommands_PopCallbacksStack(void);
|
|
|
|
void RunBattleScriptCommands(void);
|
2020-09-08 22:44:04 +02:00
|
|
|
void SpecialStatusesClear(void);
|
2023-09-14 11:05:00 +02:00
|
|
|
void SetTypeBeforeUsingMove(u32 move, u32 battlerAtk);
|
2021-07-27 17:49:39 +02:00
|
|
|
bool32 IsWildMonSmart(void);
|
2023-02-23 23:14:14 +01:00
|
|
|
u8 CreateNPCTrainerPartyFromTrainer(struct Pokemon *party, const struct Trainer *trainer, bool32 firstTrainer, u32 battleTypeFlags);
|
2023-04-05 21:50:26 +02:00
|
|
|
void ModifyPersonalityForNature(u32 *personality, u32 newNature);
|
|
|
|
u32 GeneratePersonalityForGender(u32 gender, u32 species);
|
2023-08-11 17:41:44 +02:00
|
|
|
void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMon *partyEntry);
|
2017-10-06 19:09:37 +02:00
|
|
|
|
2021-10-04 16:21:03 +02:00
|
|
|
extern struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE];
|
2018-10-12 03:23:39 +02:00
|
|
|
|
2021-10-04 16:21:03 +02:00
|
|
|
extern const struct SpriteTemplate gUnusedBattleInitSprite;
|
2021-01-23 05:22:37 +01:00
|
|
|
extern const struct OamData gOamData_BattleSpriteOpponentSide;
|
|
|
|
extern const struct OamData gOamData_BattleSpritePlayerSide;
|
2019-10-18 01:22:03 +02:00
|
|
|
extern const u8 gTypeNames[NUMBER_OF_MON_TYPES][TYPE_NAME_LENGTH + 1];
|
2018-02-26 14:29:17 +01:00
|
|
|
extern const struct TrainerMoney gTrainerMoneyTable[];
|
|
|
|
extern const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1];
|
|
|
|
extern const u8 *const gAbilityDescriptionPointers[];
|
|
|
|
|
2017-10-06 19:09:37 +02:00
|
|
|
extern const u8 gStatusConditionString_PoisonJpn[8];
|
|
|
|
extern const u8 gStatusConditionString_SleepJpn[8];
|
|
|
|
extern const u8 gStatusConditionString_ParalysisJpn[8];
|
|
|
|
extern const u8 gStatusConditionString_BurnJpn[8];
|
|
|
|
extern const u8 gStatusConditionString_IceJpn[8];
|
|
|
|
extern const u8 gStatusConditionString_ConfusionJpn[8];
|
|
|
|
extern const u8 gStatusConditionString_LoveJpn[8];
|
|
|
|
|
2018-06-20 23:07:51 +02:00
|
|
|
extern const u8 *const gStatusConditionStringsTable[7][2];
|
2017-10-06 17:06:45 +02:00
|
|
|
|
2018-01-16 23:15:02 +01:00
|
|
|
#endif // GUARD_BATTLE_MAIN_H
|