diff options
Diffstat (limited to 'include/pokemon.h')
-rw-r--r-- | include/pokemon.h | 194 |
1 files changed, 7 insertions, 187 deletions
diff --git a/include/pokemon.h b/include/pokemon.h index ec125573c..2e28ae0f5 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -4,136 +4,6 @@ #include "constants/pokemon.h" #include "sprite.h" -#define MON_DATA_PERSONALITY 0 -#define MON_DATA_OT_ID 1 -#define MON_DATA_NICKNAME 2 -#define MON_DATA_LANGUAGE 3 -#define MON_DATA_SANITY_IS_BAD_EGG 4 -#define MON_DATA_SANITY_HAS_SPECIES 5 -#define MON_DATA_SANITY_IS_EGG 6 -#define MON_DATA_OT_NAME 7 -#define MON_DATA_MARKINGS 8 -#define MON_DATA_CHECKSUM 9 -#define MON_DATA_ENCRYPT_SEPARATOR 10 -#define MON_DATA_SPECIES 11 -#define MON_DATA_HELD_ITEM 12 -#define MON_DATA_MOVE1 13 -#define MON_DATA_MOVE2 14 -#define MON_DATA_MOVE3 15 -#define MON_DATA_MOVE4 16 -#define MON_DATA_PP1 17 -#define MON_DATA_PP2 18 -#define MON_DATA_PP3 19 -#define MON_DATA_PP4 20 -#define MON_DATA_PP_BONUSES 21 -#define MON_DATA_COOL 22 -#define MON_DATA_BEAUTY 23 -#define MON_DATA_CUTE 24 -#define MON_DATA_EXP 25 -#define MON_DATA_HP_EV 26 -#define MON_DATA_ATK_EV 27 -#define MON_DATA_DEF_EV 28 -#define MON_DATA_SPEED_EV 29 -#define MON_DATA_SPATK_EV 30 -#define MON_DATA_SPDEF_EV 31 -#define MON_DATA_FRIENDSHIP 32 -#define MON_DATA_SMART 33 -#define MON_DATA_POKERUS 34 -#define MON_DATA_MET_LOCATION 35 -#define MON_DATA_MET_LEVEL 36 -#define MON_DATA_MET_GAME 37 -#define MON_DATA_POKEBALL 38 -#define MON_DATA_HP_IV 39 -#define MON_DATA_ATK_IV 40 -#define MON_DATA_DEF_IV 41 -#define MON_DATA_SPEED_IV 42 -#define MON_DATA_SPATK_IV 43 -#define MON_DATA_SPDEF_IV 44 -#define MON_DATA_IS_EGG 45 -#define MON_DATA_ABILITY_NUM 46 -#define MON_DATA_TOUGH 47 -#define MON_DATA_SHEEN 48 -#define MON_DATA_OT_GENDER 49 -#define MON_DATA_COOL_RIBBON 50 -#define MON_DATA_BEAUTY_RIBBON 51 -#define MON_DATA_CUTE_RIBBON 52 -#define MON_DATA_SMART_RIBBON 53 -#define MON_DATA_TOUGH_RIBBON 54 -#define MON_DATA_STATUS 55 -#define MON_DATA_LEVEL 56 -#define MON_DATA_HP 57 -#define MON_DATA_MAX_HP 58 -#define MON_DATA_ATK 59 -#define MON_DATA_DEF 60 -#define MON_DATA_SPEED 61 -#define MON_DATA_SPATK 62 -#define MON_DATA_SPDEF 63 -#define MON_DATA_MAIL 64 -#define MON_DATA_SPECIES2 65 -#define MON_DATA_IVS 66 -#define MON_DATA_CHAMPION_RIBBON 67 -#define MON_DATA_WINNING_RIBBON 68 -#define MON_DATA_VICTORY_RIBBON 69 -#define MON_DATA_ARTIST_RIBBON 70 -#define MON_DATA_EFFORT_RIBBON 71 -#define MON_DATA_GIFT_RIBBON_1 72 -#define MON_DATA_GIFT_RIBBON_2 73 -#define MON_DATA_GIFT_RIBBON_3 74 -#define MON_DATA_GIFT_RIBBON_4 75 -#define MON_DATA_GIFT_RIBBON_5 76 -#define MON_DATA_GIFT_RIBBON_6 77 -#define MON_DATA_GIFT_RIBBON_7 78 -#define MON_DATA_FATEFUL_ENCOUNTER 79 -#define MON_DATA_OBEDIENCE 80 -#define MON_DATA_KNOWN_MOVES 81 -#define MON_DATA_RIBBON_COUNT 82 -#define MON_DATA_RIBBONS 83 -#define MON_DATA_ATK2 84 -#define MON_DATA_DEF2 85 -#define MON_DATA_SPEED2 86 -#define MON_DATA_SPATK2 87 -#define MON_DATA_SPDEF2 88 - -#define MAX_LEVEL 100 - -#define OT_ID_RANDOM_NO_SHINY 2 -#define OT_ID_PRESET 1 -#define OT_ID_PLAYER_ID 0 - -#define MON_GIVEN_TO_PARTY 0x0 -#define MON_GIVEN_TO_PC 0x1 -#define MON_CANT_GIVE 0x2 - -#define PLAYER_HAS_TWO_USABLE_MONS 0x0 -#define PLAYER_HAS_ONE_MON 0x1 -#define PLAYER_HAS_ONE_USABLE_MON 0x2 - -#define MON_MALE 0x00 -#define MON_FEMALE 0xFE -#define MON_GENDERLESS 0xFF - -#define FRIENDSHIP_EVENT_GROW_LEVEL 0x0 -#define FRIENDSHIP_EVENT_VITAMIN 0x1 // unused -#define FRIENDSHIP_EVENT_BATTLE_ITEM 0x2 // unused -#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 0x3 -#define FRIENDSHIP_EVENT_LEARN_TMHM 0x4 -#define FRIENDSHIP_EVENT_WALKING 0x5 -#define FRIENDSHIP_EVENT_FAINT_SMALL 0x6 -#define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 0x7 -#define FRIENDSHIP_EVENT_FAINT_LARGE 0x8 - -#define STATUS_PRIMARY_NONE 0x0 -#define STATUS_PRIMARY_POISON 0x1 -#define STATUS_PRIMARY_PARALYSIS 0x2 -#define STATUS_PRIMARY_SLEEP 0x3 -#define STATUS_PRIMARY_FREEZE 0x4 -#define STATUS_PRIMARY_BURN 0x5 -#define STATUS_PRIMARY_POKERUS 0x6 -#define STATUS_PRIMARY_FAINTED 0x7 - -#define MAX_TOTAL_EVS 510 -#define UNOWN_FORM_COUNT 28 - struct PokemonSubstruct0 { u16 species; @@ -145,8 +15,8 @@ struct PokemonSubstruct0 struct PokemonSubstruct1 { - u16 moves[4]; - u8 pp[4]; + u16 moves[MAX_MON_MOVES]; + u8 pp[MAX_MON_MOVES]; }; struct PokemonSubstruct2 @@ -273,7 +143,7 @@ struct BattlePokemon /*0x06*/ u16 speed; /*0x08*/ u16 spAttack; /*0x0A*/ u16 spDefense; - /*0x0C*/ u16 moves[4]; + /*0x0C*/ u16 moves[MAX_MON_MOVES]; /*0x14*/ u32 hpIV:5; /*0x14*/ u32 attackIV:5; /*0x15*/ u32 defenseIV:5; @@ -287,7 +157,7 @@ struct BattlePokemon /*0x21*/ u8 type1; /*0x22*/ u8 type2; /*0x23*/ u8 unknown; - /*0x24*/ u8 pp[4]; + /*0x24*/ u8 pp[MAX_MON_MOVES]; /*0x28*/ u16 hp; /*0x2A*/ u8 level; /*0x2B*/ u8 friendship; @@ -348,13 +218,6 @@ struct BattleMove u8 flags; }; -#define FLAG_MAKES_CONTACT 0x1 -#define FLAG_PROTECT_AFFECTED 0x2 -#define FLAG_MAGICCOAT_AFFECTED 0x4 -#define FLAG_SNATCH_AFFECTED 0x8 -#define FLAG_MIRROR_MOVE_AFFECTED 0x10 -#define FLAG_KINGSROCK_AFFECTED 0x20 - struct SpindaSpot { u8 x, y; @@ -367,46 +230,6 @@ struct __attribute__((packed)) LevelUpMove u16 level:7; }; -enum -{ - GROWTH_MEDIUM_FAST, - GROWTH_ERRATIC, - GROWTH_FLUCTUATING, - GROWTH_MEDIUM_SLOW, - GROWTH_FAST, - GROWTH_SLOW -}; - -enum -{ - BODY_COLOR_RED, - BODY_COLOR_BLUE, - BODY_COLOR_YELLOW, - BODY_COLOR_GREEN, - BODY_COLOR_BLACK, - BODY_COLOR_BROWN, - BODY_COLOR_PURPLE, - BODY_COLOR_GRAY, - BODY_COLOR_WHITE, - BODY_COLOR_PINK -}; - -#define EVO_FRIENDSHIP 0x0001 // Pokémon levels up with friendship ≥ 220 -#define EVO_FRIENDSHIP_DAY 0x0002 // Pokémon levels up during the day with friendship ≥ 220 -#define EVO_FRIENDSHIP_NIGHT 0x0003 // Pokémon levels up at night with friendship ≥ 220 -#define EVO_LEVEL 0x0004 // Pokémon reaches the specified level -#define EVO_TRADE 0x0005 // Pokémon is traded -#define EVO_TRADE_ITEM 0x0006 // Pokémon is traded while it's holding the specified item -#define EVO_ITEM 0x0007 // specified item is used on Pokémon -#define EVO_LEVEL_ATK_GT_DEF 0x0008 // Pokémon reaches the specified level with attack > defense -#define EVO_LEVEL_ATK_EQ_DEF 0x0009 // Pokémon reaches the specified level with attack = defense -#define EVO_LEVEL_ATK_LT_DEF 0x000a // Pokémon reaches the specified level with attack < defense -#define EVO_LEVEL_SILCOON 0x000b // Pokémon reaches the specified level with a Silcoon personality value -#define EVO_LEVEL_CASCOON 0x000c // Pokémon reaches the specified level with a Cascoon personality value -#define EVO_LEVEL_NINJASK 0x000d // Pokémon reaches the specified level (special value for Ninjask) -#define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja) -#define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value - struct Evolution { u16 method; @@ -414,8 +237,6 @@ struct Evolution u16 targetSpecies; }; -#define EVOS_PER_MON 5 - extern u8 gPlayerPartyCount; extern struct Pokemon gPlayerParty[PARTY_SIZE]; extern u8 gEnemyPartyCount; @@ -466,7 +287,6 @@ void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest); u8 GetLevelFromMonExp(struct Pokemon *mon); u8 GetLevelFromBoxMonExp(struct BoxPokemon *boxMon); u16 GiveMoveToMon(struct Pokemon *mon, u16 move); -u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move); void SetMonMoveSlot(struct Pokemon *mon, u16 move, u8 slot); void SetBattleMonMoveSlot(struct BattlePokemon *mon, u16 move, u8 slot); @@ -522,7 +342,7 @@ bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex, u8 e); bool8 HealStatusConditions(struct Pokemon *mon, u32 battlePartyId, u32 healMask, u8 battlerId); u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit); -u8 *sub_806CF78(u16 itemId); +u8 *UseStatIncreaseItem(u16 itemId); u8 GetNature(struct Pokemon *mon); u8 GetNatureFromPersonality(u32 personality); u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem); @@ -536,8 +356,8 @@ u16 SpeciesToCryId(u16 species); void sub_806D544(u16 species, u32 personality, u8 *dest); void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, u8 a4); void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies); -bool8 sub_806D7EC(void); -bool16 GetLinkTrainerFlankId(u8 id); +u8 GetPlayerFlankId(void); +u16 GetLinkTrainerFlankId(u8 id); s32 GetBattlerMultiplayerId(u16 a1); u8 GetTrainerEncounterMusicId(u16 trainerOpponentId); u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex); |