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);
|
2017-10-22 18:43:15 +02:00
|
|
|
void SwitchInClearSetData(void);
|
|
|
|
void FaintClearSetData(void);
|
|
|
|
void BattleTurnPassed(void);
|
|
|
|
u8 IsRunningFromBattleImpossible(void);
|
2019-10-26 03:55:01 +02:00
|
|
|
void SwitchPartyOrder(u8 battlerId);
|
2017-10-22 18:43:15 +02:00
|
|
|
void SwapTurnOrder(u8 id1, u8 id2);
|
2018-07-14 22:56:03 +02:00
|
|
|
u32 GetBattlerTotalSpeedStat(u8 battlerId);
|
2019-02-16 14:54:17 +01:00
|
|
|
s8 GetChosenMovePriority(u32 battlerId);
|
|
|
|
s8 GetMovePriority(u32 battlerId, u16 move);
|
2018-02-07 22:53:40 +01:00
|
|
|
u8 GetWhoStrikesFirst(u8 battlerId1, u8 battlerId2, bool8 ignoreChosenMoves);
|
2017-10-22 18:43:15 +02:00
|
|
|
void RunBattleScriptCommands_PopCallbacksStack(void);
|
|
|
|
void RunBattleScriptCommands(void);
|
2018-02-07 22:53:40 +01:00
|
|
|
bool8 TryRunFromBattle(u8 battlerId);
|
2020-09-08 22:44:04 +02:00
|
|
|
void SpecialStatusesClear(void);
|
2018-07-29 11:32:40 +02:00
|
|
|
void SetTypeBeforeUsingMove(u16 move, u8 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
|