From 40e311f222a0604e35ae9c4d729ba5cfa2644748 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 4 Aug 2024 18:49:21 +0200 Subject: [PATCH] Import struct monster from pmdsky-debug --- common.mk | 2 +- include/dungeon_mode.h | 870 ++++++++- include/dungeon_mode_common.h | 39 + include/enums.h | 3464 +++++++++++++++++++++++++++++++++ include/overlay_3102382820.h | 40 +- include/util.h | 7 + src/overlay_3102382820.c | 24 +- tools/m2ctx/m2ctx.sh | 2 +- 8 files changed, 4409 insertions(+), 39 deletions(-) create mode 100644 include/dungeon_mode_common.h create mode 100644 include/enums.h diff --git a/common.mk b/common.mk index d199d91a..25b2f8c2 100644 --- a/common.mk +++ b/common.mk @@ -118,7 +118,7 @@ XMAP := $(NEF).xMAP EXCCFLAGS := -Cpp_exceptions off -MWCFLAGS = $(DEFINES) -enum int -lang c99 $(EXCCFLAGS) -gccext,on -proc $(PROC) -msgstyle gcc -gccinc -i ./include -i ./include/library -i $(WORK_DIR)/files -I$(WORK_DIR)/lib/include -interworking -inline on,noauto -char signed -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error +MWCFLAGS = $(DEFINES) -enum min -lang c99 $(EXCCFLAGS) -gccext,on -proc $(PROC) -msgstyle gcc -gccinc -i ./include -i ./include/library -i $(WORK_DIR)/files -I$(WORK_DIR)/lib/include -interworking -inline on,noauto -char signed -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error MWASFLAGS = $(DEFINES) -proc $(PROC_S) -gccinc -i . -i ./include -i $(WORK_DIR)/asm/include -i $(WORK_DIR)/files -i $(WORK_DIR)/lib/asm/include -i $(WORK_DIR)/lib/syscall/asm/include -I$(WORK_DIR)/lib/include -DSDK_ASM MWLDFLAGS := -proc $(PROC) -nopic -nopid -interworking -map closure,unused -symtab sort -m _start -msgstyle gcc diff --git a/include/dungeon_mode.h b/include/dungeon_mode.h index da174dd9..86052ae7 100644 --- a/include/dungeon_mode.h +++ b/include/dungeon_mode.h @@ -2,7 +2,9 @@ #define PMDSKY_DUNGEON_MODE_H #include "util.h" +#include "enums.h" #include "graphics.h" +#include "dungeon_mode_common.h" // Used in various contexts, like with entity positions in the dungeon struct position { @@ -24,12 +26,802 @@ struct dungeon { u8 floor; // 0x749 u8 PAD2[74554]; #ifndef JAPAN - u32 PAD3[41]; + u8 PAD3[164]; #endif - struct entity* party_members[4]; // 0x4800 + struct entity* party_members[4]; // 0x12B28 // Possibly more stuff }; +// Item info +struct item { + // 0x0: flags: 1-byte bitfield + u8 flags_0x0; + /* bool f_exists : 1; // Validity flag */ + /* bool f_in_shop : 1; // In a Kecleon Shop */ + /* bool f_unpaid : 1; // Picked up from a Kecleon Shop but not paid for yet */ + /* bool f_sticky : 1; // Sticky */ + /* bool f_set : 1; // Usable by L+R */ + /* bool flag_unk5 : 1; */ + /* // For stolen items to recover from outlaws (has red X)? Could be for other items for other */ + /* // types of missions? (Uncertain) */ + /* bool f_unk_mission_item1 : 1; */ + /* // For stolen items to recover from outlaws (has red X)? Could be for other items for other */ + /* // types of missions? (Uncertain) Definitely used temporarily when sorting the items in */ + /* // storage. */ + /* bool f_unk_mission_item2 : 1; */ + // 0x1: For bag items. 0 for none, 1 if held by the leader, 2 for the second party member, etc. + u8 held_by; + // 0x2: Only for stackable items. Will be 0 if unapplicable. For Poké, this is an "amount code" + // rather than the literal amount (see MONEY_QUANTITY_TABLE) + u16 quantity; + enum item_id id; // 0x4 +}; + +// Monster stat modifier info +struct monster_stat_modifiers { + // Stages go from 0-20 inclusive, with normal being 10 + s16 offensive_stages[2]; // 0x0: {atk, sp_atk} + s16 defensive_stages[2]; // 0x4: {def, sp_def} + s16 hit_chance_stages[2]; // 0x8: {accuracy, evasion} + s16 flash_fire_boost; // 0xC: can be 0, 1, or 2 + undefined field_0xe; + undefined field_0xf; + // Some moves like Screech affect the damage calculation differently than, e.g., Leer + // 0x10: binary fixed-point (8 fraction bits), {atk, sp_atk}; from Charm, Memento, etc. + fx32_8 offensive_multipliers[2]; + // 0x18: binary fixed-point (8 fraction bits), {def, sp_def}; from Screech, etc. + fx32_8 defensive_multipliers[2]; +}; + +// Monster statuses +// Many fields are indexes that select from a group of status conditions. These fields are named +// by the FIRST status in the list (when the index is 1, since 0 usually means no status). For other +// statuses in the group, see the subsequent enum values in enum status_id after the first status. +struct statuses { + bool roost; + // 0x1: The typing in entity::types before the flying type is removed for statuses::roost + // and restored to entity::types after statuses::roost ends. + enum type_id original_types[2]; + // 0x3: The move id to be used if statuses::bide is 1. + u8 bide_move_id; + undefined field_0x4; + undefined field_0x5; + undefined field_0x6; + // 0x7: Unique number given to the monster when spawning to differentiate it from other + // monsters and to properly keep track of a monster. Likely used because a monster could be + // spawned into the same slot as an old monster and using a pointer alone could cause some + // issues. Used for Leech Seed, Destiny Bond, Storm Drain, Lightning Rod (probably more). + u32 unique_id; + // 0xB: Unique number between the wrapped and wrapping target to connect them. + u32 wrap_pair_unique_id; + // 0xF: Tracks the damage taken to deal when bide status ends. Max 0x3E7 (999). + u32 bide_damage_tally; + enum monster_behavior monster_behavior : 8; // 0x13 + u8 sleep; // 0x14: STATUS_SLEEP if 1 + u8 sleep_turns; // 0x15: Turns left for the status in statuses::sleep + u8 burn; // 0x16: STATUS_BURN if 1 + u8 burn_turns; // 0x17: Turns left for the status in statuses::burn + // 0x18: Turns left until residual damage for the status in statuses::burn, if applicable + u8 burn_damage_countdown; + // 0x19: The number of times the statuses::burn_damage_countdown has reached 0. Only used + // when badly poisoned. Determines how much damage the badly poisoned status condition + // will deal. There is no noticable difference because the table this value is looked up + // on is filled with 0x6 + u8 badly_poisoned_damage_count; + undefined field_0x1a; + u8 freeze; // 0x1B: STATUS_FROZEN if 1 + undefined field_0x1c; + undefined field_0x1d; + undefined field_0x1e; + // 0x1F: Controls the animation that plays when taking damage from the constriction status. + // For some reason this is initalized to 0x22 (34)? Which is the animation used by + // the exclusive item Nether Veil. + u32 constriction_animation; + u8 freeze_turns; // 0x23: Turns left for the status in statuses::freeze + // 0x24: Turns left until residual damage for the status in statuses::freeze, if applicable + u8 freeze_damage_countdown; + undefined field_0x25; + undefined field_0x26; + u8 cringe; // 0x27: STATUS_CRINGE if 1 + u8 cringe_turns; // 0x28: Turns left for the status in statuses::cringe + u8 bide; // 0x29: STATUS_BIDE if 1 + u8 bide_turns; // 0x2A: Turns left for the status in statuses::bide + u8 bide_move_slot; // 0x2B: Slot in the user's move list + u8 reflect; // 0x2C: STATUS_REFLECT if 1 + u8 reflect_turns; // 0x2D: Turns left for the status in statuses::reflect + // 0x2E: Turns left until residual healing for the status in statuses::reflect, if applicable + u8 reflect_damage_countdown; + u8 curse; // 0x2F: STATUS_CURSED if 1 + // 0x30: Set to monster::is_not_team_member of the attacker (the one causing the decoy status). + u8 curse_applier_non_team_member_flag; + // 0x31: Set to 1 on a Pokemon when inflicted with the Decoy status. + undefined unk_decoy_tracker; + u8 curse_turns; // 0x32: Turns left for the status in statuses::curse + // 0x33: Turns left until residual damage for the status in statuses::curse, if applicable + u8 curse_damage_countdown; + undefined field_0x34; + undefined field_0x35; + undefined field_0x36; + u8 leech_seed; // 0x37: STATUS_LEECH_SEED if 1 + undefined field_0x38; + undefined field_0x39; + undefined field_0x3a; + // 0x3B: Used to track the statuses::statuses_unique_id of the relevant monster for + // statuses like Leech Seed and Destiny Bond. + u32 statuses_applier_id; + // 0x3F: Index into entity_table_hdr::monster_slot_ptrs in the dungeon that the user + // (drainer) is held. + u8 leech_seed_source_monster_index; + u8 leech_seed_turns; // 0x40: Turns left for the status in statuses::leech_seed + // 0x41: Turns left until residual damage for the status in statuses::leech_seed, if applicable. + // Behaves weirdly without an afflictor + u8 leech_seed_damage_countdown; + undefined field_0x42; + u8 sure_shot; // 0x43: STATUS_SURE_SHOT if 1 + u8 sure_shot_turns; // 0x44: Turns left for the status in statuses::sure_shot + u8 long_toss; // 0x45: STATUS_LONG_TOSS if 1 + u8 invisible; // 0x46: STATUS_INVISIBLE if 1 + u8 invisible_turns; // 0x47: Turns left for the status in statuses::invisible + u8 blinded; // 0x48: STATUS_BLINKER if 1 + u8 blinded_turns; // 0x49: Turns left for the status in statuses::blinded + u8 muzzled; // 0x4A: STATUS_MUZZLED if 1 + u8 muzzled_turns; // 0x4B: Turns left for the status in statuses::muzzled + u8 miracle_eye; // 0x4C: STATUS_MIRACLE_EYE if 1 + u8 miracle_eye_turns; // 0x4D: Turns left for the status in statuses::miracle_eye + u8 magnet_rise; // 0x4E: STATUS_MAGNET_RISE if 1 + u8 magnet_rise_turns; // 0x4F: Turns left for the status in statuses::magnet_rise + bool power_ears; // 0x50: STATUS_POWER_EARS + bool scanning; // 0x51: STATUS_SCANNING + bool stair_spotter; // 0x52: STATUS_STAIR_SPOTTER + // 0x53: Set when initally spawning a team member with the ability Pickup. + bool pickup_flag; + bool grudge; // 0x54: STATUS_GRUDGE + bool exposed; // 0x55: STATUS_EXPOSED (Foresight/Odor Sleuth) + bool type_changed; // 0x56: Flag for if the monster's type has been changed + bool boss_flag; // 0x57: Seems to be true for boss monsters + // 0x58: Appears to be a flag for when a monster increasces their speed. Maybe only used + // by the RunLeaderTurn function to know if the leader has changed their speed stage partway + // through the function? + undefined unk_sped_up_tracker; + // 0x59: Maybe related to being a team member and new recruit? Set to 1 in TryRecruit + // and 0 in SpawnTeam. Also checked in EnemyEvolution to be 0 before evolving. Maybe to + // prevent a recently recruited ally from evolving after and or to add a monster to the + // assembly after the completion of a dungeon? + undefined field_0x59; +#ifndef JAPAN + // 0x5A: Possibly a flag while in action. Could also be a flag to cause the burn from + // lava, heal a burn from water, and decrease hunger in the walls. + bool in_action; +#endif + // 0x5B: STATUS_TERRIFIED, interestingly, appears to use 0x1 for the Foe-Fear Orb but + // 0x2 for the ability Stench. The distinction only seems to exist for the game to use + // a special message for when terrified from stench ends. + u8 terrified; + u8 terrified_turns; // 0x5C: Turns left for the terrified status + u8 perish_song_turns; // 0x5D: Turns left before Perish Song takes effect + // 0x5E: Increases progressively while the No-Slip Cap is held. Capped at 0x13 + // Used to calculate the chance of an item becoming sticky, resets to 0 when that happens + u8 no_slip_cap_counter; + // 0x5F: Determines how much experience the monster will reward after being defeated + // 0 = 0.5x, 1 = 1.0x, 2 = 1.5x + u8 exp_yield; + // 0x60: Appears to be set when the held item of the monster is going to be used? + bool unk_item_use_action; + // 0x61: Is initalized to 0x63 (99). Changing it from this value causes the monster to + // begin rendering differently? For example, it causes entity::0xB3 to be 1 and forces + // entity::0x28 to be 0. + undefined field_0x61; + // 0x62: Flag for two-turn moves that haven't concluded yet. This is also a graphical flag. + // A value of 1 mean "high up" (Fly/Bounce). A value of 2 means some other condition like + // Dig, Shadow Force, etc. Other values are treated as invalid. Also used for the move + // Seismic Toss when throwing up the target. + u8 two_turn_move_invincible; + // 0x63: Related to handling AI when a decoy is present on the floor? + // Seems to only be 0, 1, 2 + undefined decoy_ai_tracker; +#ifndef JAPAN + undefined field_0x64; + undefined field_0x65; + undefined field_0x66; +#endif + // 0x67: 1 means normal. 0 means half speed. 2, 3, and 4 mean 2x, 3x, and 4x speed. + int speed_stage; + // Each counter ticks down to 0 turn by turn. The current speed_stage is calculated as: + // min(max({# nonzero speed_up_counters} - {# nonzero speed_down_counters}, 0), 4) + u8 speed_up_counters[5]; // 0x6B + u8 speed_down_counters[5]; // 0x70 + u8 stockpile_stage; // 0x75: Goes from 0-3. STATUS_STOCKPILING if nonzero +}; + +// A bitfield where every bit controls one of the icons that can appear on top of a monster's sprite +// to represent status effects. If multiple bits are set, the shown icon cycles through them. +struct status_icon_flags { + bool f_sleepless : 1; // Blue eye blinking yellow + bool f_burn : 1; // Red flame + bool f_poison : 1; // White skull + bool f_toxic : 1; // Purple skull + bool f_confused : 1; // Yellow birds + bool f_cowering : 1; // 2 green lines in circle (same as whiffer) + bool f_taunt : 1; // Fist icon + bool f_encore : 1; // Blue exclamation mark (same as low HP) + // Blue shield with white sparks. Also for counter, mini counter, mist, + // metal burst, aqua ring, and lucky chant + bool f_reflect : 1; + bool f_safeguard : 1; // Pink shield. Also for mirror coat + bool f_light_screen : 1; // Golden shield. Also for magic coat + bool f_protect : 1; // Green shield. Also for mirror move and vital throw + bool f_endure : 1; // Blue shield with red sparks + bool f_low_hp : 1; // Blue exclamation mark (same as encore) + bool f_curse : 1; // Red skull + bool f_embargo : 1; // Yellow exclamation mark. Also for gastro acid and snatch + bool f_sure_shot : 1; // Blue sword blinking yellow + bool f_whiffer : 1; // 2 green lines in circle (same as cowering) + bool f_set_damage : 1; // Blue sword blinking red + bool f_focus_energy : 1; // Red sword blinking yellow + bool f_blinded : 1; // Blue eye with an X + bool f_cross_eyed : 1; // Blue question mark + bool f_eyedrops : 1; // Blue eye blinking yellow with a circular wave + bool f_muzzled : 1; // Blinking red cross + bool f_grudge : 1; // Purple shield + bool f_exposed : 1; // Blue eye blinking red with a circular wave + bool f_sleep : 1; // Red Z's + bool f_lowered_stat : 1; // Yellow arrow pointing down + bool f_heal_block : 1; // Blinking green cross + bool f_miracle_eye : 1; // Blinking orange cross + bool f_red_exclamation_mark : 1; // Probably unused + bool f_magnet_rise : 1; // Purple arrow pointing up + + // The following 4 bytes appear to have a different meaning, maybe they are intended to + // represent icons that are always displayed and do not cycle (inferred from the difference + // between the ice block and the other icons). Except for the first bit, the others do not + // seem to have an effect, but the code stores the full 4 bytes as a bitwise OR of some of the + // flags (see UpdateStatusIconBitfield). + bool f_freeze : 1; // Ice block + u8 flags_unk2 : 7; + undefined field_0x5; + undefined field_0x6; + undefined field_0x7; +}; + +// Stores a parameter for an action taken by a monster +struct action_parameter { + // 0x0: Metadata for the action. + // E.g., this is the monster index when taking an action on a monster, the move index when + // using a move or a union item_index value when using an item. + u8 action_use_idx; + undefined field_0x1; + struct position item_pos; // 0x2: Position of the item to use when using an item on the floor +}; + +// Contains data used to describe an action taken by a monster. +struct action_data { + enum action action_id; // 0x0: Action ID + enum direction_id direction : 8; // 0x2: Direction in which the action will be performed + undefined field_0x3; + struct action_parameter action_parameters[2]; // 0x4: Parameters for the action + s16 field_0x10; + s16 field_0x12; +}; + +// Monster info +struct monster { + // 0x0: flags: 2-byte bitfield + // If true, the AI will skip this monster's turn. There's also an unresearched + // check related to constriction that reads this flag + u16 flags_0x0; + //bool f_ai_unk : 1; + //bool f_ai_skip_turn : 1; // If true, the AI will skip this monster's turn and reset the flag. + //u16 flags_unk2 : 3; + //bool f_swapping_places : 1; // Swapping places with another monster + //u16 flags_unk6 : 3; + //bool f_walking : 1; // Walking (but not dashing) + //u16 flags_unk10 : 5; + //bool f_swapping_places_petrified_ally : 1; // Swapping places with a petrified ally + + enum monster_id id : 16; // 0x2: + enum monster_id apparent_id : 16; // 0x4: What's outwardly displayed if Transformed + bool is_not_team_member; // 0x6: true for enemies and allied NPCs that aren't on the team + bool is_team_leader; // 0x7 + // 0x8: An ally is an NPC that isn't a normal team member, e.g. for story boss battles + bool is_ally; + enum shopkeeper_mode shopkeeper : 8; // 0x9 + u8 level; // 0xA + undefined field_0xb; + s16 team_index; // 0xC: In order by team lineup + s16 iq; // 0xE + s16 hp; // 0x10: Current HP + s16 max_hp_stat; // 0x12: Add to max_hp_boost for the actual max HP + undefined field_0x14; + undefined field_0x15; + s16 max_hp_boost; // 0x16: From Life Seeds, Sitrus Berries, etc. + undefined field_0x18; + undefined field_0x19; + u8 offensive_stats[2]; // 0x1A: {atk, sp_atk} + u8 defensive_stats[2]; // 0x1C: {def, sp_def} + u8 field_0x1e; + u8 field_0x1f; + s32 exp; // 0x20: Total Exp. Points + struct monster_stat_modifiers stat_modifiers; // 0x24 + s16 hidden_power_base_power; // 0x44 + enum type_id hidden_power_type : 8; // 0x46 + undefined field_0x47; + enum dungeon_id joined_at : 8; // 0x48: Also used as a unique identifier for special monsters + u8 joined_at_floor; // 0x49: Floor number of recruitment. 0 for special recruits + struct action_data action; // 0x4A: Determines the action the monster will take on this turn + enum type_id types[2]; // 0x5E + enum ability_id abilities[2]; // 0x60 + struct item held_item; // 0x62 + // 0x68: Previous held item. Used for whenever taking the X-Ray Specs or Y-Ray Specs on or off + // in order to update the camera and minimap. Changed to held_item.id after checking. + enum item_id previous_held_item_id; + // Previous position data is used by the AI + struct position prev_pos; // 0x6A: Position 1 turn ago + struct position prev_pos2; // 0x6E: Position 2 turns ago + struct position prev_pos3; // 0x72: Position 3 turns ago + struct position prev_pos4; // 0x76: Position 4 turns ago + undefined field_0x7a; + undefined field_0x7b; + enum ai_objective ai_objective : 8; // 0x7C + bool ai_not_next_to_target; // 0x7D: This NPC monster is not next to its current target + bool ai_targeting_enemy; // 0x7E: This NPC monster is targeting an enemy monster + bool ai_turning_around; // 0x7F: This NPC monster has decided to turn around + // 0x80: entity::spawn_genid of the entity currently being targeted + u16 ai_target_spawn_genid; + undefined field_0x82; + undefined field_0x83; + struct entity* ai_target; // 0x84: Current or most recent AI target + undefined field_0x88; + undefined field_0x89; + undefined field_0x8a; + undefined field_0x8b; + struct position ai_target_pos; // 0x8C: Position of the entity currently being targeted + // 0x90: Work array while updating skills in the menu. Same meaning as iq_skill_flags. + u32 iq_skill_menu_flags[3]; + // 0x9C: First 9 bytes contain bitfield data; the rest is presumably padding. + // Bitvector. See enum iq_skill_id for the meaning of each bit. + u32 iq_skill_flags[3]; + enum tactic_id tactic : 8; // 0xA8 + + //struct statuses statuses; // 0xA9 / Need to be inline for alignment + bool roost; + // 0xAA / 0x1: The typing in entity::types before the flying type is removed for statuses::roost + // and restored to entity::types after statuses::roost ends. + enum type_id original_types[2]; + // 0xAC / 0x3: The move id to be used if statuses::bide is 1. + u8 bide_move_id; + undefined field_0xad; + undefined field_0xae; + undefined field_0xaf; + // 0xB0 / 0x7: Unique number given to the monster when spawning to differentiate it from other + // monsters and to properly keep track of a monster. Likely used because a monster could be + // spawned into the same slot as an old monster and using a pointer alone could cause some + // issues. Used for Leech Seed, Destiny Bond, Storm Drain, Lightning Rod (probably more). + u32 unique_id; + // 0xB4 / 0xB: Unique number between the wrapped and wrapping target to connect them. + u32 wrap_pair_unique_id; + // 0xB8 / 0xF: Tracks the damage taken to deal when bide status ends. Max 0x3E7 (999). + u32 bide_damage_tally; + enum monster_behavior monster_behavior : 8; // 0xBC / 0x13 + u8 sleep; // 0xBD / 0x14: STATUS_SLEEP if 1 + u8 sleep_turns; // 0xBE / 0x15: Turns left for the status in statuses::sleep + u8 burn; // 0xBF / 0x16: STATUS_BURN if 1 + u8 burn_turns; // 0xC0 / 0x17: Turns left for the status in statuses::burn + // 0xC1 / 0x18: Turns left until residual damage for the status in statuses::burn, if applicable + u8 burn_damage_countdown; + // 0xC2 / 0x19: The number of times the statuses::burn_damage_countdown has reached 0. Only used + // when badly poisoned. Determines how much damage the badly poisoned status condition + // will deal. There is no noticable difference because the table this value is looked up + // on is filled with 0x6 + u8 badly_poisoned_damage_count; + undefined field_0xc3; + u8 freeze; // 0xc4 / 0x1B: STATUS_FROZEN if 1 + undefined field_0xc5; + undefined field_0xc6; + undefined field_0xc7; + // 0xC8 / 0x1F: Controls the animation that plays when taking damage from the constriction status. + // For some reason this is initalized to 0x22 (34)? Which is the animation used by + // the exclusive item Nether Veil. + u32 constriction_animation; + u8 freeze_turns; // 0xCC / 0x23: Turns left for the status in statuses::freeze + // 0xCD / 0x24: Turns left until residual damage for the status in statuses::freeze, if applicable + u8 freeze_damage_countdown; + undefined field_0xCE; + undefined field_0xCF; + u8 cringe; // 0xD0 / 0x27: STATUS_CRINGE if 1 + u8 cringe_turns; // 0xD1 / 0x28: Turns left for the status in statuses::cringe + u8 bide; // 0xD2 / 0x29: STATUS_BIDE if 1 + u8 bide_turns; // 0xD3 / 0x2A: Turns left for the status in statuses::bide + u8 bide_move_slot; // 0xD4 / 0x2B: Slot in the user's move list + u8 reflect; // 0xD5 / 0x2C: STATUS_REFLECT if 1 + u8 reflect_turns; // 0xD6 / 0x2D: Turns left for the status in statuses::reflect + // 0xD7 / 0x2E: Turns left until residual healing for the status in statuses::reflect, if applicable + u8 reflect_damage_countdown; + u8 curse; // 0xD8 / 0x2F: STATUS_CURSED if 1 + // 0xD9 / 0x30: Set to monster::is_not_team_member of the attacker (the one causing the decoy status). + u8 curse_applier_non_team_member_flag; + // 0xDA / 0x31: Set to 1 on a Pokemon when inflicted with the Decoy status. + undefined unk_decoy_tracker; + u8 curse_turns; // 0xDB / 0x32: Turns left for the status in statuses::curse + // 0xDC / 0x33: Turns left until residual damage for the status in statuses::curse, if applicable + u8 curse_damage_countdown; + undefined field_0xdd; + undefined field_0xde; + undefined field_0xdf; + u8 leech_seed; // 0xE0 / 0x37: STATUS_LEECH_SEED if 1 + undefined field_0xe1; + undefined field_0xe2; + undefined field_0xe3; + // 0xE4 / 0x3B: Used to track the statuses::statuses_unique_id of the relevant monster for + // statuses like Leech Seed and Destiny Bond. + u32 statuses_applier_id; + // 0xE8 / 0x3F: Index into entity_table_hdr::monster_slot_ptrs in the dungeon that the user + // (drainer) is held. + u8 leech_seed_source_monster_index; + u8 leech_seed_turns; // 0xE9 / 0x40: Turns left for the status in statuses::leech_seed + // 0xEA / 0x41: Turns left until residual damage for the status in statuses::leech_seed, if applicable. + // Behaves weirdly without an afflictor + u8 leech_seed_damage_countdown; + undefined field_0xEB; + u8 sure_shot; // 0xEC / 0x43: STATUS_SURE_SHOT if 1 + u8 sure_shot_turns; // 0xED / 0x44: Turns left for the status in statuses::sure_shot + u8 long_toss; // 0xEE / 0x45: STATUS_LONG_TOSS if 1 + u8 invisible; // 0xEF / 0x46: STATUS_INVISIBLE if 1 + u8 invisible_turns; // 0xF0 / 0x47: Turns left for the status in statuses::invisible + u8 blinded; // 0xF1 / 0x48: STATUS_BLINKER if 1 + u8 blinded_turns; // 0xF2 / 0x49: Turns left for the status in statuses::blinded + u8 muzzled; // 0xF3 / 0x4A: STATUS_MUZZLED if 1 + u8 muzzled_turns; // 0xF4 / 0x4B: Turns left for the status in statuses::muzzled + u8 miracle_eye; // 0xF5 / 0x4C: STATUS_MIRACLE_EYE if 1 + u8 miracle_eye_turns; // 0xF6 / 0x4D: Turns left for the status in statuses::miracle_eye + u8 magnet_rise; // 0xF7 / 0x4E: STATUS_MAGNET_RISE if 1 + u8 magnet_rise_turns; // 0xF8 / 0x4F: Turns left for the status in statuses::magnet_rise + bool power_ears; // 0xF9 / 0x50: STATUS_POWER_EARS + bool scanning; // 0xFA / 0x51: STATUS_SCANNING + bool stair_spotter; // 0xFB / 0x52: STATUS_STAIR_SPOTTER + // 0xFC / 0x53: Set when initally spawning a team member with the ability Pickup. + bool pickup_flag; + bool grudge; // 0xFD / 0x54: STATUS_GRUDGE + bool exposed; // 0xFE / 0x55: STATUS_EXPOSED (Foresight/Odor Sleuth) + bool type_changed; // 0xFF / 0x56: Flag for if the monster's type has been changed + bool boss_flag; // 0x100 / 0x57: Seems to be true for boss monsters + // 0x101 / 0x58: Appears to be a flag for when a monster increasces their speed. Maybe only used + // by the RunLeaderTurn function to know if the leader has changed their speed stage partway + // through the function? + undefined unk_sped_up_tracker; + // 0x102 / 0x59: Maybe related to being a team member and new recruit? Set to 1 in TryRecruit + // and 0 in SpawnTeam. Also checked in EnemyEvolution to be 0 before evolving. Maybe to + // prevent a recently recruited ally from evolving after and or to add a monster to the + // assembly after the completion of a dungeon? + undefined field_0x102; +#ifndef JAPAN + // 0x103 / 0x5A: Possibly a flag while in action. Could also be a flag to cause the burn from + // lava, heal a burn from water, and decrease hunger in the walls. + bool in_action; +#endif + // 0x104 / 0x5B: STATUS_TERRIFIED, interestingly, appears to use 0x1 for the Foe-Fear Orb but + // 0x2 for the ability Stench. The distinction only seems to exist for the game to use + // a special message for when terrified from stench ends. + u8 terrified; + u8 terrified_turns; // 0x105 / 0x5C: Turns left for the terrified status + u8 perish_song_turns; // 0x106 / 0x5D: Turns left before Perish Song takes effect + // 0x107 / 0x5E: Increases progressively while the No-Slip Cap is held. Capped at 0x13 + // Used to calculate the chance of an item becoming sticky, resets to 0 when that happens + u8 no_slip_cap_counter; + // 0x108 / 0x5F: Determines how much experience the monster will reward after being defeated + // 0 = 0.5x, 1 = 1.0x, 2 = 1.5x + u8 exp_yield; + // 0x109 / 0x60: Appears to be set when the held item of the monster is going to be used? + bool unk_item_use_action; + // 0x10A / 0x61: Is initalized to 0x63 (99). Changing it from this value causes the monster to + // begin rendering differently? For example, it causes entity::0xB3 to be 1 and forces + // entity::0x28 to be 0. + undefined field_0x10a; + // 0x10B / 0x62: Flag for two-turn moves that haven't concluded yet. This is also a graphical flag. + // A value of 1 mean "high up" (Fly/Bounce). A value of 2 means some other condition like + // Dig, Shadow Force, etc. Other values are treated as invalid. Also used for the move + // Seismic Toss when throwing up the target. + u8 two_turn_move_invincible; + // 0x10C / 0x63: Related to handling AI when a decoy is present on the floor? + // Seems to only be 0, 1, 2 + undefined decoy_ai_tracker; +#ifndef JAPAN + undefined field_0x10d; + undefined field_0x10e; + undefined field_0x10f; +#endif + // 0x110 / 0x67: 1 means normal. 0 means half speed. 2, 3, and 4 mean 2x, 3x, and 4x speed. + int speed_stage; + // Each counter ticks down to 0 turn by turn. The current speed_stage is calculated as: + // min(max({# nonzero speed_up_counters} - {# nonzero speed_down_counters}, 0), 4) + u8 speed_up_counters[5]; // 0x114 / 0x6B + u8 speed_down_counters[5]; // 0x119 / 0x70 + u8 stockpile_stage; // 0x11E / 0x75: Goes from 0-3. STATUS_STOCKPILING if nonzero + + + undefined field_0x11f; + // 0x120: If zero, when the monster is standing in a room, the AI will make it head towards a + // random exit. If nonzero, the monster will instead move in a random direction every turn. + int random_movement; + struct move moves[4]; // 0x124 + u8 move_flags; // 0x144: 1-byte bitfield + undefined field_0x145; + struct fixed_point belly; // 0x146 + struct fixed_point max_belly; // 0x14A: + // 0x14E: If true and the monster is an ally, the AI will skip it. False for enemies. + bool ai_ally_skip; + bool ai_next_to_target; // 0x14F: This NPC monster is next to its current target + // 0x150: Set if monster::is_team_leader is true and belly is empty. + bool famished; + undefined field_0x151; + // 0x152: Seems to be true if the monster has already acted this turn: attacked, used an item, + // or seemingly anything other than moving/resting. Also true when the monster faints. + bool already_acted; + // 0x153: True if this enemy should evolve. It is not enough to set this flag to evolve + // an enemy monster. You also need to set dungeon::should_enemy_evolve. + bool should_evolve; + // 0x154: True if using a charged move. Changed together with statuses::bide. + bool using_charged_move; + // 0x155: True if the target attacked a Pokemon that has STATUS_GRUDGE. + bool hit_grudge_monster; + undefined field_0x156; // 0 when the monster faints + undefined field_0x157; + // 0x158: General-purpose bitflags tracking different bits of volatile state. + // Together with prev_state_bitflags, this is typically used to determine whether + // to log a message on a state change. + u16 state_flags; + // 0x15A: The previous value of state_bitflags before the last update + u16 prev_state_flags; + // 0x15C: Appears to control if flash fire should activate. + bool apply_flash_fire_boost; + // 0x15D: Appears to be a counter for how many times rollout has hit. Likely to be able to + // determine how much extra damage consecutive rollout hits should deal. + u8 rollout_hit_counter; + // 0x15E: If true, the monster is warped after completing its move. + bool memento_warp_flag; + // 0x15F: If true, the monster's special attack is dropped after the completing its move. + bool overheat_special_attack_drop_flag; + // 0x160: If true, the monster's shadow is drawn. This value is initalized to 1 for every + // monster except Diglett and Dugtrio. + bool display_shadow; + // 0x161: If true, prevents giving items to this monster. Might have a broader meaning, + // such as whether the monster is a guest pokémon. + bool cannot_give_items; + // 0x162: Related to using a move and either missing or fainting. Set to 1 right before + // the function for a move is called and set to 0 (sometimes) in ApplyDamage. Gets set + // when the monster faints sometimes with field 0x156. When false, causes random + // outcomes with the monster to fail. + bool field_0x162; + // 0x163: Related to controlling the number of attacks per move use. Possibly to account + // for two-turn moves? + bool field_0x163; + bool took_damage_flag; // 0x164: Set after the monster took damage. + // 0x165: Appears to be some sort of validity check? Where 0 is valid and 1 is invalid. + // HandleFaint sets this number to 1. Also set to 1 if IsMonsterIdInNormalRange is false. + bool field_0x165; + // 0x166: Set after the monster attacks (true if the attack missed, false otherwise). If true + // when the monster attacks, Practice Swinger will activate. + bool practice_swinger_flag; + // 0x167: Set to true when the monster receives a critical hit. If true when the monster + // attacks, Anger Point will activate. Set to false after the monster attacks. + bool anger_point_flag; + undefined field_0x168; + undefined field_0x169; + // 0x16A: When not DIR_NONE, monster will turn in the specified direction and + // its AI will be forced to target the tile next to it in that direction. + // Used to prevent bosses from turning towards team members the moment the boss fight + // starts (which would override their intended starting facing direction). + enum direction_id force_turn : 8; + undefined field_0x16b; + undefined field_0x16c; + undefined field_0x16d; + undefined field_0x16e; + undefined field_0x16f; + // 0x170: Set to make the monster disappear when using the move U-turn. + bool uturn_hide_monster_flag; + // 0x171: Some kind of visual flag? Gets set to 0 temporarily when changing Shaymin form + // or when using the Gone Pebble? Also hardcoded to be set to 0 for monsters that generally + // tend to float? Otherwise 1? + bool field_0x171; + // 0x172: Set when the leader and falling through a pitfall trap. + bool pitfall_trap_flag_0x172; + // 0x173: Some kind of visual flag? + bool field_0x173; + // 0x174: Set when the leader and falling through a pitfall trap. + bool pitfall_trap_flag_0x174; + undefined field_0x175; + undefined field_0x176; + // 0x177: Appears to be the direction for using sleep talk? Set to DIR_NONE when awake. + enum direction_id sleep_talk_direction : 8; + // 0x178: Appears to be the direction for using snore? Set to DIR_NONE when awake. + enum direction_id snore_direction : 8; + // 0x179: Seems to be set to 4 when the monster initally throws something and probably + // related to direction somehow. Checked in a loop for every monster. + u8 field_0x179; + // 0x17A: Somehow related to sprite size? + undefined field_0x17a; + // 0x17B: Somehow related to sprite size? + undefined field_0x17b; + undefined field_0x17c; + undefined field_0x17d; + struct position target_pos; // 0x17E: The AI's target's position on screen + struct position pixel_pos; // 0x182: The monster's graphical position on screen? + undefined field_0x186; + undefined field_0x187; + undefined field_0x188; + undefined field_0x189; + undefined field_0x18a; + undefined field_0x18b; + // 0x18C: Bitflags that cause non-damaging exclusive items to trigger on the + // attacker after they have completed their move. For example, the Eclipse Robe + // (Darkrai exclusive item) may afflict attacking enemies with the nightmare + // status condition. (Only uses first 21 bits). + u32 exclusive_item_trigger_bitflags; + // 0x190: Appears to be related to the item name of the exclusive item that + // caused the effect to trigger. + s16 field_0x190; + // 0x192: Bitflags that cause non-damaging abilities to trigger on the attacker + // after they have completed their move. Abilites like magnet pull, cute charm, + // static, and flame body. (Only uses first 11 bits). One exception is the move + // Rapid Spin which sets one of the flags for the user. + u16 contact_ability_trigger_bitflags; + undefined field_0x194; + undefined field_0x195; + undefined field_0x196; + undefined field_0x197; + undefined field_0x198; + undefined field_0x199; + undefined field_0x19a; + undefined field_0x19b; + struct position pos; // 0x19C: Mirror of the position on the entity struct + undefined field_0x1a0; + undefined field_0x1a1; + undefined field_0x1a2; + undefined field_0x1a3; + undefined field_0x1a4; + undefined field_0x1a5; + undefined field_0x1a6; + undefined field_0x1a7; + undefined field_0x1a8; + undefined field_0x1a9; + undefined field_0x1aa; + undefined field_0x1ab; + undefined field_0x1ac; + undefined field_0x1ad; + undefined field_0x1ae; + undefined field_0x1af; + undefined field_0x1b0; + undefined field_0x1b1; + undefined field_0x1b2; + undefined field_0x1b3; + u16 walk_anim_frames_left; // 0x1B4: Number of frames left in walking animation? + undefined field_0x1b6; + undefined field_0x1b7; + undefined field_0x1b8; + undefined field_0x1b9; + undefined field_0x1ba; + undefined field_0x1bb; + undefined field_0x1bc; + undefined field_0x1bd; + undefined field_0x1be; + undefined field_0x1bf; + undefined field_0x1c0; + undefined field_0x1c1; + undefined field_0x1c2; + undefined field_0x1c3; + undefined field_0x1c4; + undefined field_0x1c5; + undefined field_0x1c6; + undefined field_0x1c7; + undefined field_0x1c8; + undefined field_0x1c9; + undefined field_0x1ca; + undefined field_0x1cb; + undefined field_0x1cc; + undefined field_0x1cd; + undefined field_0x1ce; + undefined field_0x1cf; + undefined field_0x1d0; + undefined field_0x1d1; + undefined field_0x1d2; + undefined field_0x1d3; + undefined field_0x1d4; + undefined field_0x1d5; + undefined field_0x1d6; + undefined field_0x1d7; + undefined field_0x1d8; + undefined field_0x1d9; + undefined field_0x1da; + undefined field_0x1db; + undefined field_0x1dc; + undefined field_0x1dd; + undefined field_0x1de; + undefined field_0x1df; + undefined field_0x1e0; + undefined field_0x1e1; + undefined field_0x1e2; + undefined field_0x1e3; + undefined field_0x1e4; + undefined field_0x1e5; + undefined field_0x1e6; + undefined field_0x1e7; + undefined field_0x1e8; + undefined field_0x1e9; + undefined field_0x1ea; + undefined field_0x1eb; + undefined field_0x1ec; + undefined field_0x1ed; + undefined field_0x1ee; + undefined field_0x1ef; + undefined field_0x1f0; + undefined field_0x1f1; + undefined field_0x1f2; + undefined field_0x1f3; + undefined field_0x1f4; + undefined field_0x1f5; + undefined field_0x1f6; + undefined field_0x1f7; + undefined field_0x1f8; + undefined field_0x1f9; + undefined field_0x1fa; + undefined field_0x1fb; + undefined field_0x1fc; + undefined field_0x1fd; + undefined field_0x1fe; + undefined field_0x1ff; + undefined field_0x200; + undefined field_0x201; + undefined field_0x202; + undefined field_0x203; + undefined field_0x204; + undefined field_0x205; + undefined field_0x206; + undefined field_0x207; + undefined field_0x208; + undefined field_0x209; + undefined field_0x20a; + undefined field_0x20b; + undefined field_0x20c; + undefined field_0x20d; + undefined field_0x20e; + undefined field_0x20f; + u8 hp_fractional; // 0x210: 200 * fractional_part(HP) + undefined field_0x211; + undefined field_0x212; + undefined field_0x213; + // 0x214: Somehow related to gaining exp through a joy ribbon. Set to 0 after + // gaining or losing a level. Also checked and set to 0 when an enemy evolves. + // Maybe for a specific scenario of leveling up with exp from a joy ribbon? + u32 unk_exp_tracker; + // 0x218: Status icons displayed on top of the monster's sprite + struct status_icon_flags status_icons; + // 0x220: Seems to be related in some way to shadow size and being a water tileset. So + // probably controls when the ripple effect when standing on water. + u8 water_shadow_ripple_tracker; + // 0x221: Set if the current move being used was copied by Me First + bool me_first_flag; + undefined field_0x222; + undefined field_0x223; + // Stat boosts from exclusive items with EXCLUSIVE_EFF_STAT_BOOST + u8 exclusive_item_offense_boosts[2]; // 0x224: {atk, sp_atk} + u8 exclusive_item_defense_boosts[2]; // 0x226: {def, sp_def} + // 0x228: Bitvector. See enum exclusive_item_effect_id for the meaning of each bit + u32 exclusive_item_effect_flags[5]; + // 0x23C: Initialized to 0. Probably menu related only, seems to be set to true through the + // menu. + bool field_0x23c; + // 0x23F: When reviving a monster, temporarily set to true. Probably a visual indicator + // of some kind? + bool unk_revive_visual_tracker; + // 0x23E: Gets set to 0 before using an attack and gets set to 1 in LevelUp. Seems to stop + // the rest of the attacks (ie from Swift Swim) from continuing. Possibly to avoid the + // the monster leveling up and trying to use a move that was just overwritten by a new move? + undefined field_0x23e; + // 0x23F: Gets set to 1 when the move used won't use up any PP. Used to check if the + // monster should lose extra PP from the ability Pressure. + bool should_not_lose_pp; +}; + + // Entity type. This is used to tag generic entity pointers. enum entity_type { ENTITY_NOTHING = 0, @@ -40,6 +832,7 @@ enum entity_type { // Used when a temporary instance of this struct is created to pass it to some // function that requires it as a parameter ENTITY_TEMPORARY = 6, + ENTITY_PAD = 0xffffffff, // To Force on 32 bits }; // Generic entity data @@ -82,25 +875,62 @@ struct entity { void* info; // 0xB4: Points to info struct for monster/item/trap }; -// Info struct for leader -struct leader_info { - u8 PAD[322]; -#ifndef JAPAN - u8 PAD2[4]; -#endif - struct fixed_point belly; // 0x146 - struct fixed_point max_belly; // 0x14a - // Possibly more stuff +// Used in menus and the post-dungeon summary. +struct monster_summary { + enum monster_id id; // 0x0 + u8 monster_name[10]; // 0x2 + undefined field_0xC; + undefined field_0xD; + undefined field_0xE; + undefined field_0xF; + undefined field_0x10; + undefined field_0x11; + undefined field_0x12; + undefined field_0x13; + undefined field_0x14; + undefined field_0x15; + enum type_id types[2]; // 0x16 + enum ability_id abilities[2]; // 0x18 + enum dungeon_id joined_at; // 0x1A + u8 joined_at_floor; // 0x1B + struct item held_item; // 0x1C + undefined field_0x22; + undefined field_0x23; + s32 hp; // 0x24: Current HP + s32 max_hp; // 0x28: Actual max HP (hp + hp boost) + u32 level; // 0x2C + s32 exp; // 0x30 + u8 offensive_stats[2]; // 0x34: {atk, sp_atk} + u8 defensive_stats[2]; // 0x36: {def, sp_def} + bool is_team_leader; // 0x38 + u8 attack_boost; // 0x39: from things like Power Band, Munch Belt + u8 special_attack_boost; // 0x3A + u8 defense_boost; // 0x3B + u8 special_defense_boost; // 0x3C + undefined field_0x3D; + s16 iq; // 0x3E + undefined field_0x40; + undefined field_0x41; + // 0x42: Level upon first evolution. Set to 0 in dungeon mode. + u8 level_at_first_evo; + // 0x43: Level upon first evolution. Set to 0 in dungeon mode. + u8 level_at_second_evo; + // 0x44: Evolution status. In ground_mode, accounts for luminous spring being unlocked. + u8 evo_status; + bool inflicted_with_gastro_acid; // 0x45 + undefined field_0x46; + undefined field_0x47; + u32 iq_skill_flags[3]; // 0x48 + enum tactic_id tactic; // 0x54 + undefined field_0x55; + undefined field_0x56; + undefined field_0x57; + // 0x58: Appears to be a list of all the currently inflicted statues in their enum form. The + // last entry (30th) appears to always be STATUS_NONE to serve as a terminator for the list. + // While in ground mode, it's always filled with STATUS_NONE. + enum status_id active_statuses[30]; + undefined2 _padding_0x76; }; -// Info struct for party members -struct party_member_info { - u8 PAD[16]; - s16 hp_left; // 0x10 - s16 hp_max_1; // 0x12 - s16 field_0x14; - s16 hp_max_2; // 0x16 - // Possibly more stuff -}; #endif //PMDSKY_DUNGEON_MODE_H diff --git a/include/dungeon_mode_common.h b/include/dungeon_mode_common.h new file mode 100644 index 00000000..851adc60 --- /dev/null +++ b/include/dungeon_mode_common.h @@ -0,0 +1,39 @@ +#ifndef HEADERS_TYPES_DUNGEON_MODE_COMMON_H_ +#define HEADERS_TYPES_DUNGEON_MODE_COMMON_H_ + +#include "enums.h" + +// Monster move info +struct move { + // 0x0: flags0: 1-byte bitfield + u8 flags0; + /* bool f_exists : 1; // This move will show up in the move list */ + /* bool f_subsequent_in_link_chain : 1; // This move is in a link chain, but not the first move */ + /* bool f_enabled_for_ai : 1; // AI can use this move */ + /* bool f_set : 1; // Usable by L+A */ + /* bool f_last_used : 1; // This move was the last one used (for things like Torment?) */ + /* bool f_disabled : 1; // For Torment (and maybe others) */ + /* u8 flags0_unk6 : 2; */ + + u8 field_0x1; + + // 0x2: flags2: 2-byte bitfield + u16 flags2; + /* bool f_sealed : 1; // Sealed by a Seal Trap. Also prevents AI from using this move */ + /* u16 flags2_unk1 : 2; */ + /* bool f_consume_pp : 1; // This move will consume PP this turn */ + /* bool f_consume_2_pp : 1; // Consume 2 PP this turn. No effect unless f_consume_pp is set */ + /* u16 flags2_unk5 : 1; */ + /* // Consume 4 PP this turn. No effect unless f_consume_pp is set, overrides f_consume_2_pp */ + /* bool f_consume_4_pp : 1; */ + /* u16 flags2_unk7 : 1; */ + /* u16 flags2_unk8 : 1; */ + /* bool f_exclusive_item_pp_boost : 1; // A PP-boosting exclusive item is in effect */ + /* u16 flags3_unk10 : 6; */ + + enum move_id id : 16; // 0x4 + u8 pp; // 0x6: Current PP + u8 ginseng; // 0x7: Ginseng boost +}; + +#endif diff --git a/include/enums.h b/include/enums.h new file mode 100644 index 00000000..ca1cf24a --- /dev/null +++ b/include/enums.h @@ -0,0 +1,3464 @@ +#ifndef PMDSKY_ENUMS_H +#define PMDSKY_ENUMS_H + +// Direction on the dungeon grid +enum direction_id { + DIR_NONE = -1, + DIR_DOWN = 0, + DIR_DOWN_RIGHT = 1, + DIR_RIGHT = 2, + DIR_UP_RIGHT = 3, + DIR_UP = 4, + DIR_UP_LEFT = 5, + DIR_LEFT = 6, + DIR_DOWN_LEFT = 7, + DIR_CURRENT = 8, // Current direction of an entity. Used as a special value in some functions +}; + +// Tactic ID. These are usually encoded as bitvectors. +enum tactic_id { + TACTIC_LETS_GO_TOGETHER = 0, + TACTIC_YOU_GO_THE_OTHER_WAY = 1, + TACTIC_GO_AFTER_FOES = 2, + TACTIC_AVOID_THE_FIRST_HIT = 3, + TACTIC_ALL_FOR_ONE = 4, + TACTIC_GROUP_SAFETY = 5, + TACTIC_AVOID_TROUBLE = 6, + TACTIC_BE_PATIENT = 7, + TACTIC_KEEP_YOUR_DISTANCE = 8, + TACTIC_WAIT_THERE = 9, + TACTIC_GET_AWAY_FROM_HERE = 10, + TACTIC_NONE = 11, // used as an empty placeholder in menus (and maybe other things). +}; + +// AI objective that controls how an AI acts in the moment. +// These were probably taken from Rescue Team; need to confirm validity in Explorers. +enum ai_objective { + AI_UNKNOWN = 0, + AI_CHASE_TARGET = 1, + AI_CHASE_REMEMBERED_TARGET = 2, // Chase a target using a previous position + AI_ROAM = 3, // Roam hallways + AI_LEAVE_ROOM = 4, // Get out of a room + AI_RUN_AWAY = 5, + AI_STAND_STILL = 6, + AI_TAKE_ITEM = 7, +}; + +// Item ID +enum item_id { + ITEM_NOTHING = 0, + ITEM_STICK = 1, + ITEM_IRON_THORN = 2, + ITEM_SILVER_SPIKE = 3, + ITEM_GOLD_FANG = 4, + ITEM_CACNEA_SPIKE = 5, + ITEM_CORSOLA_TWIG = 6, + ITEM_GRAVELEROCK = 7, + ITEM_GEO_PEBBLE = 8, + ITEM_GOLD_THORN = 9, + ITEM_RARE_FOSSIL = 10, + ITEM_UNNAMED_0xB = 11, + ITEM_UNNAMED_0xC = 12, + ITEM_NO_SLIP_CAP = 13, + ITEM_Y_RAY_SPECS = 14, + ITEM_GAGGLE_SPECS = 15, + ITEM_MOBILE_SCARF = 16, + ITEM_HEAL_RIBBON = 17, + ITEM_TWIST_BAND = 18, + ITEM_SCOPE_LENS = 19, + ITEM_PATSY_BAND = 20, + ITEM_NO_STICK_CAP = 21, + ITEM_PIERCE_BAND = 22, + ITEM_JOY_RIBBON = 23, + ITEM_X_RAY_SPECS = 24, + ITEM_PERSIM_BAND = 25, + ITEM_POWER_BAND = 26, + ITEM_PECHA_SCARF = 27, + ITEM_INSOMNISCOPE = 28, + ITEM_WARP_SCARF = 29, + ITEM_TIGHT_BELT = 30, + ITEM_SNEAK_SCARF = 31, + ITEM_GOLD_RIBBON = 32, + ITEM_GOGGLE_SPECS = 33, + ITEM_DIET_RIBBON = 34, + ITEM_TRAP_SCARF = 35, + ITEM_RACKET_BAND = 36, + ITEM_DEF_SCARF = 37, + ITEM_STAMINA_BAND = 38, + ITEM_PLAIN_RIBBON = 39, + ITEM_SPECIAL_BAND = 40, + ITEM_ZINC_BAND = 41, + ITEM_DETECT_BAND = 42, + ITEM_SPACE_GLOBE = 43, + ITEM_DODGE_SCARF = 44, + ITEM_BOUNCE_BAND = 45, + ITEM_CURVE_BAND = 46, + ITEM_WHIFF_SPECS = 47, + ITEM_NO_AIM_SCOPE = 48, + ITEM_LOCKON_SPECS = 49, + ITEM_MUNCH_BELT = 50, + ITEM_PASS_SCARF = 51, + ITEM_WEATHER_BAND = 52, + ITEM_FRIEND_BOW = 53, + ITEM_BEAUTY_SCARF = 54, + ITEM_SUN_RIBBON = 55, + ITEM_LUNAR_RIBBON = 56, + ITEM_GOLDEN_MASK = 57, + ITEM_AMBER_TEAR = 58, + ITEM_ICY_FLUTE = 59, + ITEM_FIERY_DRUM = 60, + ITEM_TERRA_CYMBAL = 61, + ITEM_AQUA_MONICA = 62, + ITEM_ROCK_HORN = 63, + ITEM_GRASS_CORNET = 64, + ITEM_SKY_MELODICA = 65, + ITEM_MIRACLE_CHEST = 66, + ITEM_WONDER_CHEST = 67, + ITEM_IQ_BOOSTER = 68, + ITEM_HEAL_SEED = 69, + ITEM_ORAN_BERRY = 70, + ITEM_SITRUS_BERRY = 71, + ITEM_EYEDROP_SEED = 72, + ITEM_REVIVER_SEED = 73, + ITEM_BLINKER_SEED = 74, + ITEM_DOOM_SEED = 75, + ITEM_X_EYE_SEED = 76, + ITEM_LIFE_SEED = 77, + ITEM_RAWST_BERRY = 78, + ITEM_HUNGER_SEED = 79, + ITEM_QUICK_SEED = 80, + ITEM_PECHA_BERRY = 81, + ITEM_CHERI_BERRY = 82, + ITEM_TOTTER_SEED = 83, + ITEM_SLEEP_SEED = 84, + ITEM_PLAIN_SEED = 85, + ITEM_WARP_SEED = 86, + ITEM_BLAST_SEED = 87, + ITEM_GINSENG = 88, + ITEM_JOY_SEED = 89, + ITEM_CHESTO_BERRY = 90, + ITEM_STUN_SEED = 91, + ITEM_GABITE_SCALE = 92, + ITEM_GOLDEN_SEED = 93, + ITEM_VILE_SEED = 94, + ITEM_PURE_SEED = 95, + ITEM_VIOLENT_SEED = 96, + ITEM_VANISH_SEED = 97, + ITEM_UNNAMED_0x62 = 98, + ITEM_MAX_ELIXIR = 99, + ITEM_PROTEIN = 100, + ITEM_CALCIUM = 101, + ITEM_IRON = 102, + ITEM_NECTAR = 103, + ITEM_DROPEYE_SEED = 104, + ITEM_REVISER_SEED = 105, + ITEM_SLIP_SEED = 106, + ITEM_VIA_SEED = 107, + ITEM_ZINC = 108, + ITEM_APPLE = 109, + ITEM_BIG_APPLE = 110, + ITEM_GRIMY_FOOD = 111, + ITEM_HUGE_APPLE = 112, + ITEM_UNNAMED_0x71 = 113, + ITEM_UNNAMED_0x72 = 114, + ITEM_GOLDEN_APPLE = 115, + ITEM_MIX_ELIXIR = 116, + ITEM_OREN_BERRY = 117, + ITEM_DOUGH_SEED = 118, + ITEM_WHITE_GUMMI = 119, + ITEM_RED_GUMMI = 120, + ITEM_BLUE_GUMMI = 121, + ITEM_GRASS_GUMMI = 122, + ITEM_YELLOW_GUMMI = 123, + ITEM_CLEAR_GUMMI = 124, + ITEM_ORANGE_GUMMI = 125, + ITEM_PINK_GUMMI = 126, + ITEM_BROWN_GUMMI = 127, + ITEM_SKY_GUMMI = 128, + ITEM_GOLD_GUMMI = 129, + ITEM_GREEN_GUMMI = 130, + ITEM_GRAY_GUMMI = 131, + ITEM_PURPLE_GUMMI = 132, + ITEM_ROYAL_GUMMI = 133, + ITEM_BLACK_GUMMI = 134, + ITEM_SILVER_GUMMI = 135, + ITEM_WONDER_GUMMI = 136, + ITEM_GRAVELYROCK = 137, + ITEM_UNNAMED_0x8A = 138, + ITEM_UPGRADE = 139, + ITEM_KINGS_ROCK = 140, + ITEM_THUNDERSTONE = 141, + ITEM_DEEPSEASCALE = 142, + ITEM_DEEPSEATOOTH = 143, + ITEM_SUN_STONE = 144, + ITEM_MOON_STONE = 145, + ITEM_FIRE_STONE = 146, + ITEM_WATER_STONE = 147, + ITEM_METAL_COAT = 148, + ITEM_LEAF_STONE = 149, + ITEM_DRAGON_SCALE = 150, + ITEM_LINK_CABLE = 151, + ITEM_DUBIOUS_DISC = 152, + ITEM_PROTECTOR = 153, + ITEM_REAPER_CLOTH = 154, + ITEM_RAZOR_FANG = 155, + ITEM_RAZOR_CLAW = 156, + ITEM_ELECTIRIZER = 157, + ITEM_MAGMARIZER = 158, + ITEM_OVAL_STONE = 159, + ITEM_DAWN_STONE = 160, + ITEM_SHINY_STONE = 161, + ITEM_DUSK_STONE = 162, + ITEM_CORONET_ROCK = 163, + ITEM_MOSSY_ROCK = 164, + ITEM_FROZEN_ROCK = 165, + ITEM_UNNAMED_0xA6 = 166, + ITEM_GONE_PEBBLE = 167, + ITEM_WANDER_GUMMI = 168, + ITEM_PRIZE_TICKET = 169, + ITEM_SILVER_TICKET = 170, + ITEM_GOLD_TICKET = 171, + ITEM_PRISM_TICKET = 172, + ITEM_MYSTERY_PART = 173, + ITEM_SECRET_SLAB = 174, + ITEM_UNNAMED_0xAF = 175, + ITEM_UNNAMED_0xB0 = 176, + ITEM_UNNAMED_0xB1 = 177, + ITEM_WONDER_EGG = 178, + ITEM_GRACIDEA = 179, + ITEM_SKY_GIFT = 180, + ITEM_UNNAMED_0xB5 = 181, + ITEM_KEY = 182, + ITEM_POKE = 183, + ITEM_UNNAMED_0xB8 = 184, + ITEM_UNNAMED_0xB9 = 185, + ITEM_LOST_LOOT = 186, + ITEM_TM_USED_TM = 187, + ITEM_TM_FOCUS_PUNCH = 188, + ITEM_TM_DRAGON_CLAW = 189, + ITEM_TM_WATER_PULSE = 190, + ITEM_TM_CALM_MIND = 191, + ITEM_TM_ROAR = 192, + ITEM_TM_TOXIC = 193, + ITEM_TM_HAIL = 194, + ITEM_TM_BULK_UP = 195, + ITEM_TM_BULLET_SEED = 196, + ITEM_TM_HIDDEN_POWER = 197, + ITEM_UNNAMED_0xC6 = 198, + ITEM_TM_TAUNT = 199, + ITEM_TM_ICE_BEAM = 200, + ITEM_TM_BLIZZARD = 201, + ITEM_TM_HYPER_BEAM = 202, + ITEM_TM_LIGHT_SCREEN = 203, + ITEM_TM_PROTECT = 204, + ITEM_UNNAMED_0xCD = 205, + ITEM_TM_GIGA_DRAIN = 206, + ITEM_TM_SAFEGUARD = 207, + ITEM_TM_FRUSTRATION = 208, + ITEM_TM_SOLARBEAM = 209, + ITEM_TM_IRON_TAIL = 210, + ITEM_TM_THUNDERBOLT = 211, + ITEM_TM_THUNDER = 212, + ITEM_TM_EARTHQUAKE = 213, + ITEM_TM_RETURN = 214, + ITEM_TM_DIG = 215, + ITEM_TM_PSYCHIC = 216, + ITEM_TM_SHADOW_BALL = 217, + ITEM_TM_BRICK_BREAK = 218, + ITEM_UNNAMED_0xDB = 219, + ITEM_TM_REFLECT = 220, + ITEM_TM_SHOCK_WAVE = 221, + ITEM_TM_FLAMETHROWER = 222, + ITEM_TM_SLUDGE_BOMB = 223, + ITEM_UNNAMED_0xE0 = 224, + ITEM_TM_FIRE_BLAST = 225, + ITEM_UNNAMED_0xE2 = 226, + ITEM_TM_AERIAL_ACE = 227, + ITEM_TM_TORMENT = 228, + ITEM_TM_FACADE = 229, + ITEM_TM_SECRET_POWER = 230, + ITEM_TM_REST = 231, + ITEM_TM_ATTRACT = 232, + ITEM_TM_THIEF = 233, + ITEM_TM_STEEL_WING = 234, + ITEM_TM_SKILL_SWAP = 235, + ITEM_UNNAMED_0xEC = 236, + ITEM_TM_OVERHEAT = 237, + ITEM_TM_ROOST = 238, + ITEM_TM_FOCUS_BLAST = 239, + ITEM_TM_ENERGY_BALL = 240, + ITEM_TM_FALSE_SWIPE = 241, + ITEM_TM_BRINE = 242, + ITEM_TM_FLING = 243, + ITEM_TM_CHARGE_BEAM = 244, + ITEM_TM_ENDURE = 245, + ITEM_TM_DRAGON_PULSE = 246, + ITEM_TM_DRAIN_PUNCH = 247, + ITEM_TM_WILL_O_WISP = 248, + ITEM_TM_SILVER_WIND = 249, + ITEM_TM_EMBARGO = 250, + ITEM_TM_EXPLOSION = 251, + ITEM_TM_SHADOW_CLAW = 252, + ITEM_TM_PAYBACK = 253, + ITEM_TM_RECYCLE = 254, + ITEM_TM_GIGA_IMPACT = 255, + ITEM_TM_ROCK_POLISH = 256, + ITEM_TM_WIDE_SLASH = 257, + ITEM_UNNAMED_0x102 = 258, + ITEM_UNNAMED_0x103 = 259, + ITEM_TM_VACUUM_CUT = 260, + ITEM_TM_DIVE = 261, + ITEM_TM_FLASH = 262, + ITEM_TM_STONE_EDGE = 263, + ITEM_TM_AVALANCHE = 264, + ITEM_TM_THUNDER_WAVE = 265, + ITEM_TM_GYRO_BALL = 266, + ITEM_TM_SWORDS_DANCE = 267, + ITEM_TM_STEALTH_ROCK = 268, + ITEM_TM_PSYCH_UP = 269, + ITEM_TM_CAPTIVATE = 270, + ITEM_TM_DARK_PULSE = 271, + ITEM_TM_ROCK_SLIDE = 272, + ITEM_TM_X_SCISSOR = 273, + ITEM_TM_SLEEP_TALK = 274, + ITEM_TM_NATURAL_GIFT = 275, + ITEM_TM_POISON_JAB = 276, + ITEM_TM_DREAM_EATER = 277, + ITEM_TM_GRASS_KNOT = 278, + ITEM_TM_SWAGGER = 279, + ITEM_TM_PLUCK = 280, + ITEM_TM_U_TURN = 281, + ITEM_TM_SUBSTITUTE = 282, + ITEM_TM_FLASH_CANNON = 283, + ITEM_TM_TRICK_ROOM = 284, + ITEM_TM_CUT = 285, + ITEM_TM_FLY = 286, + ITEM_TM_SURF = 287, + ITEM_TM_STRENGTH = 288, + ITEM_TM_DEFOG = 289, + ITEM_TM_ROCK_SMASH = 290, + ITEM_TM_WATERFALL = 291, + ITEM_TM_ROCK_CLIMB = 292, + ITEM_UNNAMED_0x125 = 293, + ITEM_UNNAMED_0x126 = 294, + ITEM_UNNAMED_0x127 = 295, + ITEM_UNNAMED_0x128 = 296, + ITEM_UNNAMED_0x129 = 297, + ITEM_UNNAMED_0x12A = 298, + ITEM_UNNAMED_0x12B = 299, + ITEM_UNNAMED_0x12C = 300, + ITEM_HAIL_ORB = 301, + ITEM_SUNNY_ORB = 302, + ITEM_RAINY_ORB = 303, + ITEM_EVASION_ORB = 304, + ITEM_SANDY_ORB = 305, + ITEM_ROCKY_ORB = 306, + ITEM_SNATCH_ORB = 307, + ITEM_SEE_TRAP_ORB = 308, + ITEM_MUG_ORB = 309, + ITEM_REBOUND_ORB = 310, + ITEM_LOB_ORB = 311, + ITEM_SWITCHER_ORB = 312, + ITEM_BLOWBACK_ORB = 313, + ITEM_WARP_ORB = 314, + ITEM_TRANSFER_ORB = 315, + ITEM_SLOW_ORB = 316, + ITEM_QUICK_ORB = 317, + ITEM_LUMINOUS_ORB = 318, + ITEM_PETRIFY_ORB = 319, + ITEM_STAYAWAY_ORB = 320, + ITEM_POUNCE_ORB = 321, + ITEM_TRAWL_ORB = 322, + ITEM_CLEANSE_ORB = 323, + ITEM_UNNAMED_0x144 = 324, + ITEM_DECOY_ORB = 325, + ITEM_SLUMBER_ORB = 326, + ITEM_TOTTER_ORB = 327, + ITEM_TWO_EDGE_ORB = 328, + ITEM_SILENCE_ORB = 329, + ITEM_ESCAPE_ORB = 330, + ITEM_SCANNER_ORB = 331, + ITEM_RADAR_ORB = 332, + ITEM_DROUGHT_ORB = 333, + ITEM_TRAPBUST_ORB = 334, + ITEM_ROLLCALL_ORB = 335, + ITEM_INVISIFY_ORB = 336, + ITEM_ONE_SHOT_ORB = 337, + ITEM_IDENTIFY_ORB = 338, + ITEM_UNNAMED_0x153 = 339, + ITEM_SHOCKER_ORB = 340, + ITEM_SIZEBUST_ORB = 341, + ITEM_ONE_ROOM_ORB = 342, + ITEM_FILL_IN_ORB = 343, + ITEM_TRAPPER_ORB = 344, + ITEM_UNNAMED_0x159 = 345, + ITEM_ITEMIZER_ORB = 346, + ITEM_HURL_ORB = 347, + ITEM_MOBILE_ORB = 348, + ITEM_UNNAMED_0x15D = 349, + ITEM_STAIRS_ORB = 350, + ITEM_LONGTOSS_ORB = 351, + ITEM_PIERCE_ORB = 352, + ITEM_UNNAMED_0x161 = 353, + ITEM_SPURN_ORB = 354, + ITEM_FOE_HOLD_ORB = 355, + ITEM_ALL_MACH_ORB = 356, + ITEM_FOE_FEAR_ORB = 357, + ITEM_ALL_HIT_ORB = 358, + ITEM_FOE_SEAL_ORB = 359, + ITEM_UNNAMED_0x168 = 360, + ITEM_UNNAMED_0x169 = 361, + ITEM_LINK_BOX = 362, + ITEM_UNNAMED_0x16B = 363, + ITEM_GORGEOUS_BOX_1 = 364, + ITEM_GORGEOUS_BOX_2 = 365, + ITEM_GORGEOUS_BOX_3 = 366, + ITEM_HEAVY_BOX_1 = 367, + ITEM_HEAVY_BOX_2 = 368, + ITEM_HEAVY_BOX_3 = 369, + ITEM_SHINY_BOX_1 = 370, + ITEM_SHINY_BOX_2 = 371, + ITEM_SHINY_BOX_3 = 372, + ITEM_NIFTY_BOX_1 = 373, + ITEM_NIFTY_BOX_2 = 374, + ITEM_NIFTY_BOX_3 = 375, + ITEM_DAINTY_BOX_1 = 376, + ITEM_DAINTY_BOX_2 = 377, + ITEM_DAINTY_BOX_3 = 378, + ITEM_GLITTERY_BOX_1 = 379, + ITEM_GLITTERY_BOX_2 = 380, + ITEM_GLITTERY_BOX_3 = 381, + ITEM_PRETTY_BOX_1 = 382, + ITEM_PRETTY_BOX_2 = 383, + ITEM_PRETTY_BOX_3 = 384, + ITEM_DELUXE_BOX_1 = 385, + ITEM_DELUXE_BOX_2 = 386, + ITEM_DELUXE_BOX_3 = 387, + ITEM_LIGHT_BOX_1 = 388, + ITEM_LIGHT_BOX_2 = 389, + ITEM_LIGHT_BOX_3 = 390, + ITEM_CUTE_BOX_1 = 391, + ITEM_CUTE_BOX_2 = 392, + ITEM_CUTE_BOX_3 = 393, + ITEM_HARD_BOX_1 = 394, + ITEM_HARD_BOX_2 = 395, + ITEM_HARD_BOX_3 = 396, + ITEM_SINISTER_BOX_1 = 397, + ITEM_SINISTER_BOX_2 = 398, + ITEM_SINISTER_BOX_3 = 399, + ITEM_A_STONE = 400, + ITEM_B_STONE = 401, + ITEM_C_STONE = 402, + ITEM_D_STONE = 403, + ITEM_E_STONE = 404, + ITEM_F_STONE = 405, + ITEM_G_STONE = 406, + ITEM_H_STONE = 407, + ITEM_I_STONE = 408, + ITEM_J_STONE = 409, + ITEM_K_STONE = 410, + ITEM_L_STONE = 411, + ITEM_M_STONE = 412, + ITEM_N_STONE = 413, + ITEM_O_STONE = 414, + ITEM_P_STONE = 415, + ITEM_Q_STONE = 416, + ITEM_R_STONE = 417, + ITEM_S_STONE = 418, + ITEM_T_STONE = 419, + ITEM_U_STONE = 420, + ITEM_V_STONE = 421, + ITEM_W_STONE = 422, + ITEM_X_STONE = 423, + ITEM_Y_STONE = 424, + ITEM_Z_STONE = 425, + ITEM_EXCLAMATION_STONE = 426, + ITEM_QUESTION_STONE = 427, + ITEM_SILVER_BOW = 428, + ITEM_BROWN_BOW = 429, + ITEM_RED_BOW = 430, + ITEM_PINK_BOW = 431, + ITEM_ORANGE_BOW = 432, + ITEM_YELLOW_BOW = 433, + ITEM_LIME_BOW = 434, + ITEM_GREEN_BOW = 435, + ITEM_VIRIDIAN_BOW = 436, + ITEM_MINTY_BOW = 437, + ITEM_SKY_BLUE_BOW = 438, + ITEM_BLUE_BOW = 439, + ITEM_COBALT_BOW = 440, + ITEM_PURPLE_BOW = 441, + ITEM_VIOLET_BOW = 442, + ITEM_FUCHSIA_BOW = 443, + ITEM_PRISM_RUFF = 444, + ITEM_AQUA_COLLAR = 445, + ITEM_VOLT_COLLAR = 446, + ITEM_FIRE_COLLAR = 447, + ITEM_LIGHT_COLLAR = 448, + ITEM_DUSK_COLLAR = 449, + ITEM_VIRID_COLLAR = 450, + ITEM_ICY_COLLAR = 451, + ITEM_PEP_SASH = 452, + ITEM_COUNTER_RUFF = 453, + ITEM_VICTORY_BELT = 454, + ITEM_POWER_BANGLE = 455, + ITEM_THUNDERSHARD = 456, + ITEM_FALLEN_STAR = 457, + ITEM_FLUFF_DUST = 458, + ITEM_EGG_SHARD = 459, + ITEM_HEROIC_MEDAL = 460, + ITEM_CHIC_SHARD = 461, + ITEM_YELLOW_JEWEL = 462, + ITEM_RED_JEWEL = 463, + ITEM_BLUE_JEWEL = 464, + ITEM_LAUGH_DUST = 465, + ITEM_GUARD_SAND = 466, + ITEM_PURPLE_JEWEL = 467, + ITEM_WHITE_JEWEL = 468, + ITEM_BRAVE_DUST = 469, + ITEM_HEAL_DEW = 470, + ITEM_MARINE_CACHE = 471, + ITEM_FREEZE_VEIL = 472, + ITEM_THUNDER_VEIL = 473, + ITEM_FIRE_VEIL = 474, + ITEM_HAVOC_ROBE = 475, + ITEM_LIFE_RING = 476, + ITEM_BOLT_FANG = 477, + ITEM_FLARE_FANG = 478, + ITEM_AQUA_MANTLE = 479, + ITEM_SILVER_VEIL = 480, + ITEM_RAINBOW_VEIL = 481, + ITEM_CHRONO_VEIL = 482, + ITEM_ROCK_SASH = 483, + ITEM_ICE_SASH = 484, + ITEM_STEEL_SASH = 485, + ITEM_HEART_BROOCH = 486, + ITEM_EON_VEIL = 487, + ITEM_SEABED_VEIL = 488, + ITEM_TERRA_RING = 489, + ITEM_SKYHIGH_VEIL = 490, + ITEM_WISH_MANTLE = 491, + ITEM_REVIVE_ROBE = 492, + ITEM_SHADOW_VEIL = 493, + ITEM_PLASMA_VEIL = 494, + ITEM_EDIFY_ROBE = 495, + ITEM_CHARITY_ROBE = 496, + ITEM_HOPE_ROBE = 497, + ITEM_TIME_SHIELD = 498, + ITEM_AIR_BLADE = 499, + ITEM_SEARING_RING = 500, + ITEM_ANCIENT_RING = 501, + ITEM_NETHER_VEIL = 502, + ITEM_LUNAR_VEIL = 503, + ITEM_TIDAL_CAPE = 504, + ITEM_ECLIPSE_ROBE = 505, + ITEM_WHITE_SILK = 506, + ITEM_NORMAL_DUST = 507, + ITEM_WHITE_GEM = 508, + ITEM_JOY_GLOBE = 509, + ITEM_RED_SILK = 510, + ITEM_FIRE_DUST = 511, + ITEM_FIERY_GEM = 512, + ITEM_FIERY_GLOBE = 513, + ITEM_BLUE_SILK = 514, + ITEM_WATER_DUST = 515, + ITEM_AQUA_GEM = 516, + ITEM_AQUA_GLOBE = 517, + ITEM_GRASS_SILK = 518, + ITEM_GRASS_DUST = 519, + ITEM_GRASS_GEM = 520, + ITEM_SOOTHE_GLOBE = 521, + ITEM_YELLOW_SILK = 522, + ITEM_THUNDER_DUST = 523, + ITEM_THUNDER_GEM = 524, + ITEM_VOLT_GLOBE = 525, + ITEM_CLEAR_SILK = 526, + ITEM_ICY_DUST = 527, + ITEM_ICY_GEM = 528, + ITEM_ICY_GLOBE = 529, + ITEM_ORANGE_SILK = 530, + ITEM_COURAGE_DUST = 531, + ITEM_FIGHT_GEM = 532, + ITEM_POWER_GLOBE = 533, + ITEM_PINK_SILK = 534, + ITEM_POISON_DUST = 535, + ITEM_POISON_GEM = 536, + ITEM_POISON_GLOBE = 537, + ITEM_BROWN_SILK = 538, + ITEM_GROUND_DUST = 539, + ITEM_EARTH_GEM = 540, + ITEM_TERRA_GLOBE = 541, + ITEM_SKY_SILK = 542, + ITEM_SKY_DUST = 543, + ITEM_SKY_GEM = 544, + ITEM_SKY_GLOBE = 545, + ITEM_GOLD_SILK = 546, + ITEM_PSYCHE_DUST = 547, + ITEM_PSYCHE_GEM = 548, + ITEM_PSYCHE_GLOBE = 549, + ITEM_GREEN_SILK = 550, + ITEM_WONDER_DUST = 551, + ITEM_GUARD_GEM = 552, + ITEM_DEFEND_GLOBE = 553, + ITEM_GRAY_SILK = 554, + ITEM_ROCK_DUST = 555, + ITEM_STONE_GEM = 556, + ITEM_ROCK_GLOBE = 557, + ITEM_PURPLE_SILK = 558, + ITEM_SHADY_DUST = 559, + ITEM_SHADOW_GEM = 560, + ITEM_NETHER_GLOBE = 561, + ITEM_ROYAL_SILK = 562, + ITEM_DRAGON_DUST = 563, + ITEM_DRAGON_GEM = 564, + ITEM_DRAGON_GLOBE = 565, + ITEM_BLACK_SILK = 566, + ITEM_DARK_DUST = 567, + ITEM_DARK_GEM = 568, + ITEM_DUSK_GLOBE = 569, + ITEM_IRON_SILK = 570, + ITEM_STEEL_DUST = 571, + ITEM_METAL_GEM = 572, + ITEM_STEEL_GLOBE = 573, + ITEM_BULBA_CLAW = 574, + ITEM_BULBA_FANG = 575, + ITEM_GRASS_GUARD = 576, + ITEM_LEAFY_TIE = 577, + ITEM_IVY_CLAW = 578, + ITEM_IVY_FANG = 579, + ITEM_IVY_CREST = 580, + ITEM_PLANT_TORC = 581, + ITEM_VENUS_CLAW = 582, + ITEM_VENUS_FANG = 583, + ITEM_VENUS_SEAL = 584, + ITEM_SOLAR_SASH = 585, + ITEM_CHAR_CLAW = 586, + ITEM_CHAR_FANG = 587, + ITEM_FIERY_HEART = 588, + ITEM_HEAT_ARMLET = 589, + ITEM_CHARME_CLAW = 590, + ITEM_CHARME_FANG = 591, + ITEM_CHARME_CREST = 592, + ITEM_KINDLE_SCARF = 593, + ITEM_CHARIZ_CLAW = 594, + ITEM_CHARIZ_FANG = 595, + ITEM_CHARIZ_SEAL = 596, + ITEM_FLAME_BANGLE = 597, + ITEM_SQUIRT_FOAM = 598, + ITEM_SQUIRT_CARD = 599, + ITEM_WATER_GUARD = 600, + ITEM_AQUA_TIE = 601, + ITEM_WARTOR_CLAW = 602, + ITEM_WARTOR_FANG = 603, + ITEM_WARTOR_CREST = 604, + ITEM_BUBBLEBANGLE = 605, + ITEM_BLASTO_CLAW = 606, + ITEM_BLASTO_CARD = 607, + ITEM_BLASTO_SEAL = 608, + ITEM_HYDRO_BAND = 609, + ITEM_PICHU_HAIR = 610, + ITEM_PICHU_CARD = 611, + ITEM_EXPRESS_TAG = 612, + ITEM_SHOCKER_CAPE = 613, + ITEM_PIKACHU_HAIR = 614, + ITEM_PIKACHU_CARD = 615, + ITEM_VOLT_CHARM = 616, + ITEM_VOLT_TORC = 617, + ITEM_RAICHU_HAIR = 618, + ITEM_RAICHU_CARD = 619, + ITEM_RAICHU_CREST = 620, + ITEM_ZAPPER_SCARF = 621, + ITEM_MEOWTH_CLAW = 622, + ITEM_MEOWTH_FANG = 623, + ITEM_COIN_CHARM = 624, + ITEM_BLING_RUFF = 625, + ITEM_PERSIAN_CLAW = 626, + ITEM_PERSIAN_FANG = 627, + ITEM_INSIGHT_ROCK = 628, + ITEM_NOBLE_SCARF = 629, + ITEM_CHIKO_CLAW = 630, + ITEM_CHIKO_CARD = 631, + ITEM_DAWN_JEWEL = 632, + ITEM_FRESH_BOW = 633, + ITEM_BAYLEEF_CLAW = 634, + ITEM_BAYLEEF_CARD = 635, + ITEM_BAYLEEF_SEAL = 636, + ITEM_SPICE_BOW = 637, + ITEM_MEGANI_CLAW = 638, + ITEM_MEGANI_CARD = 639, + ITEM_SHINY_CHARM = 640, + ITEM_BRIGHT_VEIL = 641, + ITEM_CYNDA_HAIR = 642, + ITEM_CYNDA_CLAW = 643, + ITEM_BLAZING_ROCK = 644, + ITEM_STORM_SASH = 645, + ITEM_QUILA_HAIR = 646, + ITEM_QUILA_CARD = 647, + ITEM_QUILA_CREST = 648, + ITEM_VOLCANO_TORC = 649, + ITEM_TYPHLO_GASP = 650, + ITEM_TYPHLO_FANG = 651, + ITEM_TYPHLO_SEAL = 652, + ITEM_BLAST_BANGLE = 653, + ITEM_TOTODI_DEW = 654, + ITEM_TOTODI_FANG = 655, + ITEM_WATER_HEART = 656, + ITEM_WASH_BOW = 657, + ITEM_CROCO_FANG = 658, + ITEM_CROCO_CARD = 659, + ITEM_SWIRL_ROCK = 660, + ITEM_ANGER_SCARF = 661, + ITEM_FERAL_CLAW = 662, + ITEM_FERAL_FANG = 663, + ITEM_FERAL_CREST = 664, + ITEM_HYDRO_JAW = 665, + ITEM_TREECK_THORN = 666, + ITEM_TREECK_CARD = 667, + ITEM_FOREST_ORE = 668, + ITEM_GUARD_RING = 669, + ITEM_GROVY_SHOOT = 670, + ITEM_GROVY_CARD = 671, + ITEM_JUNGLE_TAG = 672, + ITEM_GRASS_BLADE = 673, + ITEM_SCEPT_CLAW = 674, + ITEM_SCEPT_CARD = 675, + ITEM_SCEPT_SEAL = 676, + ITEM_DRAIN_BANGLE = 677, + ITEM_TORCHIC_HAIR = 678, + ITEM_TORCHIC_CARD = 679, + ITEM_HOT_PEBBLE = 680, + ITEM_FIRE_CAPE = 681, + ITEM_COMBUS_SWEAT = 682, + ITEM_COMBUS_CLAW = 683, + ITEM_CHARGE_TAG = 684, + ITEM_GUTSY_BAND = 685, + ITEM_BLAZI_CLAW = 686, + ITEM_BLAZI_CARD = 687, + ITEM_BLAZI_SEAL = 688, + ITEM_BLAZE_TORC = 689, + ITEM_MUDKIP_MUD = 690, + ITEM_MUDKIP_CARD = 691, + ITEM_MUD_JEWEL = 692, + ITEM_SPEED_SCARF = 693, + ITEM_MARSH_MUD = 694, + ITEM_MARSH_CARD = 695, + ITEM_MARSH_CREST = 696, + ITEM_MARSH_TORC = 697, + ITEM_SWAMP_MUD = 698, + ITEM_SWAMP_CARD = 699, + ITEM_SWAMP_SEAL = 700, + ITEM_SWAMP_BANGLE = 701, + ITEM_SKITTY_FANG = 702, + ITEM_SKITTY_CARD = 703, + ITEM_SMILE_PEBBLE = 704, + ITEM_HEAL_PENDANT = 705, + ITEM_DELCAT_HAIR = 706, + ITEM_DELCAT_FANG = 707, + ITEM_PRIM_PEBBLE = 708, + ITEM_GUARD_COLLAR = 709, + ITEM_LUCKY_LEAF = 710, + ITEM_TURTWIG_CARD = 711, + ITEM_SPROUT_ROCK = 712, + ITEM_LEAFY_HAT = 713, + ITEM_GROTLE_TWIG = 714, + ITEM_GROTLE_CLAW = 715, + ITEM_GROTLE_CREST = 716, + ITEM_WOODY_SCARF = 717, + ITEM_TORT_CLAW = 718, + ITEM_TORT_HORN = 719, + ITEM_TORT_SEAL = 720, + ITEM_FOREST_TORC = 721, + ITEM_CHIM_HAIR = 722, + ITEM_CHIM_FANG = 723, + ITEM_NIMBLE_CHARM = 724, + ITEM_EMBER_CAP = 725, + ITEM_MONFER_HAIR = 726, + ITEM_MONFER_FANG = 727, + ITEM_MONFER_CREST = 728, + ITEM_BURST_SASH = 729, + ITEM_INFERN_HAIR = 730, + ITEM_INFERN_FANG = 731, + ITEM_INFERN_SEAL = 732, + ITEM_BLAZING_RUFF = 733, + ITEM_PIPLUP_FOAM = 734, + ITEM_PIPLUP_CARD = 735, + ITEM_SEA_ORE = 736, + ITEM_WATER_CAPE = 737, + ITEM_PRIN_FOAM = 738, + ITEM_PRIN_CARD = 739, + ITEM_PRIN_CREST = 740, + ITEM_AQUA_BLADE = 741, + ITEM_EMPOL_CLAW = 742, + ITEM_EMPOL_HORN = 743, + ITEM_EMPOL_SEAL = 744, + ITEM_MARINE_CROWN = 745, + ITEM_MUNCH_DROOL = 746, + ITEM_MUNCH_CLAW = 747, + ITEM_TUMMY_CHARM = 748, + ITEM_GLUTTON_CAPE = 749, + ITEM_SNORLAX_GASP = 750, + ITEM_SNORLAX_FANG = 751, + ITEM_VALOR_CHARM = 752, + ITEM_GLEE_SCARF = 753, + ITEM_SCYTHER_FANG = 754, + ITEM_SCYTHER_CARD = 755, + ITEM_AMBUSH_ROCK = 756, + ITEM_STRIKE_RUFF = 757, + ITEM_SCIZOR_WING = 758, + ITEM_SCIZOR_CARD = 759, + ITEM_STEEL_CHARM = 760, + ITEM_RED_ARMLET = 761, + ITEM_LAPRAS_SONG = 762, + ITEM_LAPRAS_CARD = 763, + ITEM_WAVY_CHARM = 764, + ITEM_MYSTIC_SCARF = 765, + ITEM_EEVEE_TAIL = 766, + ITEM_EEVEE_CARD = 767, + ITEM_EVOLVE_CHARM = 768, + ITEM_EEVEE = 769, + ITEM_CLEFFA_DEW = 770, + ITEM_CLEFFA_CARD = 771, + ITEM_STARRY_ORE = 772, + ITEM_COMET_RING = 773, + ITEM_CLEF_CLAW = 774, + ITEM_CLEF_FANG = 775, + ITEM_MOON_JEWEL = 776, + ITEM_MOON_SCARF = 777, + ITEM_CLEFA_CLAW = 778, + ITEM_CLEFA_CARD = 779, + ITEM_MOON_ROCK = 780, + ITEM_FAIRY_BOW = 781, + ITEM_IGGLY_DEW = 782, + ITEM_IGGLY_CARD = 783, + ITEM_BOUNCY_CHARM = 784, + ITEM_PRETTY_BOW = 785, + ITEM_JIGGLY_SONG = 786, + ITEM_JIGGLY_CARD = 787, + ITEM_SLUMBER_ROCK = 788, + ITEM_SNOOZE_RING = 789, + ITEM_WIGGLY_HAIR = 790, + ITEM_WIGGLY_CARD = 791, + ITEM_BUDDY_ROCK = 792, + ITEM_FRIEND_TORC = 793, + ITEM_TOGEPI_DEW = 794, + ITEM_TOGEPI_CARD = 795, + ITEM_PURE_HEART = 796, + ITEM_ANGEL_SCARF = 797, + ITEM_TOGETIC_WING = 798, + ITEM_TOGETIC_CARD = 799, + ITEM_HAPPY_ROCK = 800, + ITEM_LUCK_BROOCH = 801, + ITEM_TOGEK_WING = 802, + ITEM_TOGEK_CARD = 803, + ITEM_OVATION_ROCK = 804, + ITEM_GLITTER_ROBE = 805, + ITEM_SNEASEL_CLAW = 806, + ITEM_SNEASEL_CARD = 807, + ITEM_DUSK_JEWEL = 808, + ITEM_CRUEL_RING = 809, + ITEM_WEAVILE_CLAW = 810, + ITEM_WEAVILE_FANG = 811, + ITEM_VILE_TAG = 812, + ITEM_RUIN_ARMLET = 813, + ITEM_TEDDI_CLAW = 814, + ITEM_TEDDI_CARD = 815, + ITEM_HONEY_ROCK = 816, + ITEM_HEAL_SCARF = 817, + ITEM_URSA_CLAW = 818, + ITEM_URSA_FANG = 819, + ITEM_CALMING_ROCK = 820, + ITEM_HIBER_SCARF = 821, + ITEM_TYRO_SWEAT = 822, + ITEM_TYRO_CARD = 823, + ITEM_MUSCLE_CHARM = 824, + ITEM_TYROGUE = 825, + ITEM_SMOOCH_SONG = 826, + ITEM_SMOOCH_CARD = 827, + ITEM_KISS_CHARM = 828, + ITEM_HEART_TIARA = 829, + ITEM_JYNX_SONG = 830, + ITEM_JYNX_CARD = 831, + ITEM_FROZEN_ORE = 832, + ITEM_RUIN_SCARF = 833, + ITEM_ELEKID_CLAW = 834, + ITEM_ELEKID_CARD = 835, + ITEM_JOLT_CHARM = 836, + ITEM_CURRENT_RING = 837, + ITEM_ELECTA_CLAW = 838, + ITEM_ELECTA_FANG = 839, + ITEM_CHARGE_SEAL = 840, + ITEM_VOLT_BANGLE = 841, + ITEM_ELECTI_CLAW = 842, + ITEM_ELECTI_CARD = 843, + ITEM_VOLTAIC_ROCK = 844, + ITEM_VOLTAIC_BAND = 845, + ITEM_MAGBY_CLAW = 846, + ITEM_MAGBY_CARD = 847, + ITEM_EMBER_JEWEL = 848, + ITEM_COAL_RING = 849, + ITEM_MAGMAR_CLAW = 850, + ITEM_MAGMAR_CARD = 851, + ITEM_ERUPT_ORE = 852, + ITEM_MAGMA_SCARF = 853, + ITEM_MAGMOR_CLAW = 854, + ITEM_MAGMOR_CARD = 855, + ITEM_VULCAN_ROCK = 856, + ITEM_BURNING_TORC = 857, + ITEM_AZURI_DEW = 858, + ITEM_AZURI_CARD = 859, + ITEM_FOUNT_CHARM = 860, + ITEM_WATER_FLOAT = 861, + ITEM_MARILL_DEW = 862, + ITEM_MARILL_CARD = 863, + ITEM_SURFER_ROCK = 864, + ITEM_BRINE_SCARF = 865, + ITEM_AZUMA_DEW = 866, + ITEM_AZUMA_CARD = 867, + ITEM_STREAM_CHARM = 868, + ITEM_DOTTED_SCARF = 869, + ITEM_PLUSLE_TAIL = 870, + ITEM_PLUSLE_CARD = 871, + ITEM_CHEER_ROCK = 872, + ITEM_PULSE_BOW = 873, + ITEM_MINUN_TAIL = 874, + ITEM_MINUN_CARD = 875, + ITEM_VOLT_HEART = 876, + ITEM_SPARK_TIE = 877, + ITEM_CAST_DEW = 878, + ITEM_CAST_CARD = 879, + ITEM_CLOUD_ROCK = 880, + ITEM_WEATHER_CAPE = 881, + ITEM_WYNAUT_TAIL = 882, + ITEM_WYNAUT_CARD = 883, + ITEM_GRIN_CHARM = 884, + ITEM_CHEERY_SCARF = 885, + ITEM_WOBBU_SWEAT = 886, + ITEM_WOBBU_CARD = 887, + ITEM_ENDURE_ROCK = 888, + ITEM_SUFFER_SCARF = 889, + ITEM_BIDOOF_TOOTH = 890, + ITEM_BIDOOF_CARD = 891, + ITEM_FALL_CHARM = 892, + ITEM_STOLID_SCARF = 893, + ITEM_BIBA_TOOTH = 894, + ITEM_BIBA_CARD = 895, + ITEM_RIVER_CHARM = 896, + ITEM_DAM_SCARF = 897, + ITEM_SHINX_CLAW = 898, + ITEM_SHINX_FANG = 899, + ITEM_FLASH_TAG = 900, + ITEM_ENERGY_SCARF = 901, + ITEM_LUXIO_CLAW = 902, + ITEM_LUXIO_FANG = 903, + ITEM_SPARK_TAG = 904, + ITEM_SPARK_SCARF = 905, + ITEM_LUXRAY_CLAW = 906, + ITEM_LUXRAY_FANG = 907, + ITEM_GLARE_TAG = 908, + ITEM_GLARE_SASH = 909, + ITEM_PACHI_TOOTH = 910, + ITEM_PACHI_CARD = 911, + ITEM_ROUSE_CHARM = 912, + ITEM_MIRACLE_BOW = 913, + ITEM_BUIZEL_FANG = 914, + ITEM_BUIZEL_CARD = 915, + ITEM_SWIMMER_ROCK = 916, + ITEM_SCREW_TORC = 917, + ITEM_FLOAT_FANG = 918, + ITEM_FLOAT_CARD = 919, + ITEM_RESCUE_ROCK = 920, + ITEM_FLOAT_AID = 921, + ITEM_DRIFLOO_GASP = 922, + ITEM_DRIFLOO_CARD = 923, + ITEM_WIND_HEART = 924, + ITEM_DRAFT_RING = 925, + ITEM_DRIFBLI_GASP = 926, + ITEM_DRIFBLI_CARD = 927, + ITEM_EASY_CHARM = 928, + ITEM_BREEZE_SCARF = 929, + ITEM_CHERUBI_SEED = 930, + ITEM_CHERUBI_CARD = 931, + ITEM_CUTE_ORE = 932, + ITEM_CHARM_BOW = 933, + ITEM_CHERRIM_DEW = 934, + ITEM_CHERRIM_CARD = 935, + ITEM_SWEET_AROMA = 936, + ITEM_PETAL_DRESS = 937, + ITEM_BONSLY_DEW = 938, + ITEM_BONSLY_CARD = 939, + ITEM_ARID_TAG = 940, + ITEM_TEARY_CAPE = 941, + ITEM_SUDO_SWEAT = 942, + ITEM_SUDO_CARD = 943, + ITEM_DRAIN_ROCK = 944, + ITEM_FAKE_TORC = 945, + ITEM_JUNIOR_BEAM = 946, + ITEM_JUNIOR_CARD = 947, + ITEM_MIMIC_PEBBLE = 948, + ITEM_COPY_MASK = 949, + ITEM_MIME_KEY = 950, + ITEM_MIME_CARD = 951, + ITEM_BULWARK_ROCK = 952, + ITEM_BARRIER_BOW = 953, + ITEM_HAPPINY_DEW = 954, + ITEM_HAPPINY_CARD = 955, + ITEM_PLAY_TAG = 956, + ITEM_NURTURE_CAPE = 957, + ITEM_CHANSEY_SONG = 958, + ITEM_CHANSEY_CARD = 959, + ITEM_LUCKY_CHARM = 960, + ITEM_LUCKY_SCARF = 961, + ITEM_BLISSEY_SONG = 962, + ITEM_BLISSEY_CARD = 963, + ITEM_AMITY_ROCK = 964, + ITEM_FAITH_RING = 965, + ITEM_GIBLE_FANG = 966, + ITEM_GIBLE_CARD = 967, + ITEM_DRAGON_JEWEL = 968, + ITEM_DRAGON_TIE = 969, + ITEM_GABITE_CLAW = 970, + ITEM_GABITE_FANG = 971, + ITEM_STAR_ROCK = 972, + ITEM_METEOR_TORC = 973, + ITEM_GAR_CLAW = 974, + ITEM_GAR_FANG = 975, + ITEM_SPEED_TAG = 976, + ITEM_MACH_SCARF = 977, + ITEM_RIOLU_TAIL = 978, + ITEM_RIOLU_CARD = 979, + ITEM_VALIANT_ROCK = 980, + ITEM_EMIT_RING = 981, + ITEM_LUCARIO_FANG = 982, + ITEM_LUCARIO_CARD = 983, + ITEM_PLEDGE_ROCK = 984, + ITEM_RAVAGE_RING = 985, + ITEM_MANTYKE_BEAM = 986, + ITEM_MANTYKE_CARD = 987, + ITEM_WAFT_ROCK = 988, + ITEM_OCEAN_BOW = 989, + ITEM_MANTINE_FOAM = 990, + ITEM_MANTINE_CARD = 991, + ITEM_SUNSET_ROCK = 992, + ITEM_HORIZON_BOW = 993, + ITEM_PHIONE_SONG = 994, + ITEM_PHIONE_CARD = 995, + ITEM_WAVE_JEWEL = 996, + ITEM_RIPPLE_CAPE = 997, + ITEM_VULPIX_TAIL = 998, + ITEM_VULPIX_CARD = 999, + ITEM_VULPIX_TAG = 1000, + ITEM_GLOWING_BOW = 1001, + ITEM_NINE_HAIR = 1002, + ITEM_NINE_CARD = 1003, + ITEM_NINE_SEAL = 1004, + ITEM_AFIRE_COLLAR = 1005, + ITEM_PHANPY_CLAW = 1006, + ITEM_PHANPY_CARD = 1007, + ITEM_PHANPY_TAG = 1008, + ITEM_VALUE_RUFF = 1009, + ITEM_DONPHAN_FANG = 1010, + ITEM_DONPHAN_CARD = 1011, + ITEM_DON_CREST = 1012, + ITEM_ARMOR_SCARF = 1013, + ITEM_CATER_BELT = 1014, + ITEM_DEFENSE_BOW = 1015, + ITEM_GLITTERY_BOW = 1016, + ITEM_WEEDLE_BOW = 1017, + ITEM_KAKUNA_SCARF = 1018, + ITEM_CHARGE_SCARF = 1019, + ITEM_PIDGEY_BOW = 1020, + ITEM_PIDGEO_SCARF = 1021, + ITEM_PIDGEOT_TORC = 1022, + ITEM_RATTA_SCARF = 1023, + ITEM_OVERCOME_BOW = 1024, + ITEM_QUIRKY_BOW = 1025, + ITEM_WING_SCARF = 1026, + ITEM_LEASH_BOW = 1027, + ITEM_SHOCK_RUFF = 1028, + ITEM_SAND_SCARF = 1029, + ITEM_SANDY_TORC = 1030, + ITEM_POINTY_SCARF = 1031, + ITEM_RETURN_SCARF = 1032, + ITEM_IMPACT_TORC = 1033, + ITEM_HALVE_SCARF = 1034, + ITEM_THORNY_SCARF = 1035, + ITEM_KING_SASH = 1036, + ITEM_DODGE_BOW = 1037, + ITEM_ABSORB_SCARF = 1038, + ITEM_ODD_BOW = 1039, + ITEM_GUARD_HAT = 1040, + ITEM_AROMA_SCARF = 1041, + ITEM_MOVING_SCARF = 1042, + ITEM_FIRM_HAT = 1043, + ITEM_GAZE_GOGGLES = 1044, + ITEM_VENOMOTH_BOW = 1045, + ITEM_DIGLETT_HAT = 1046, + ITEM_DUGTRIO_BOW = 1047, + ITEM_PSYDUCK_HAT = 1048, + ITEM_PADDLE_SCARF = 1049, + ITEM_MANKEY_TORC = 1050, + ITEM_NULLIFY_BELT = 1051, + ITEM_GROWL_SCARF = 1052, + ITEM_LEGEND_BOW = 1053, + ITEM_DAMP_BOW = 1054, + ITEM_POLI_BOW = 1055, + ITEM_BOLD_BELT = 1056, + ITEM_PREDICT_TORC = 1057, + ITEM_PSYCHIC_TORC = 1058, + ITEM_SPARKLE_RUFF = 1059, + ITEM_IMPISH_BAND = 1060, + ITEM_STRONG_BELT = 1061, + ITEM_MACHAMP_BELT = 1062, + ITEM_BELL_BOW = 1063, + ITEM_DIGEST_SCARF = 1064, + ITEM_VICTREE_TORC = 1065, + ITEM_TANGLE_BOW = 1066, + ITEM_TENTA_CAPE = 1067, + ITEM_GEODUDE_TORC = 1068, + ITEM_ROCKY_TORC = 1069, + ITEM_RUGGED_SASH = 1070, + ITEM_HEATED_BOW = 1071, + ITEM_SUNLIGHT_BOW = 1072, + ITEM_SLOWPOKE_HAT = 1073, + ITEM_SLOW_SCARF = 1074, + ITEM_MAGNE_TORC = 1075, + ITEM_MAGNETON_BOW = 1076, + ITEM_BULLSEYE_BOW = 1077, + ITEM_BUDDY_TORC = 1078, + ITEM_FIGHT_TORC = 1079, + ITEM_GENTLE_BOW = 1080, + ITEM_NORTH_TORC = 1081, + ITEM_GRIMY_SCARF = 1082, + ITEM_SLIMY_BOW = 1083, + ITEM_SHELL_TORC = 1084, + ITEM_COVER_ARMOR = 1085, + ITEM_GASTLY_VEIL = 1086, + ITEM_SLIP_SCARF = 1087, + ITEM_SUNGLASSES = 1088, + ITEM_TRUST_BROOCH = 1089, + ITEM_DROWZEE_TIE = 1090, + ITEM_DREAM_COIN = 1091, + ITEM_KRABBY_BOW = 1092, + ITEM_SUPER_SASH = 1093, + ITEM_BALL_SCARF = 1094, + ITEM_ELECTRO_BOW = 1095, + ITEM_REPEL_SCARF = 1096, + ITEM_EXEGGU_SASH = 1097, + ITEM_CUBONE_SCARF = 1098, + ITEM_MAROWAK_TORC = 1099, + ITEM_LICKY_SCARF = 1100, + ITEM_KOFFING_BOW = 1101, + ITEM_WEEZ_SCARF = 1102, + ITEM_SOLID_SHIELD = 1103, + ITEM_PIERCE_DRILL = 1104, + ITEM_STICKY_BOW = 1105, + ITEM_KANG_APRON = 1106, + ITEM_HORSEA_BOW = 1107, + ITEM_SWIRL_SCARF = 1108, + ITEM_GOLDEEN_BOW = 1109, + ITEM_SEAKING_BOW = 1110, + ITEM_RECOVER_TORC = 1111, + ITEM_STARMIE_BELT = 1112, + ITEM_PINSIR_SASH = 1113, + ITEM_RUSHING_BOW = 1114, + ITEM_MAGIKARP_BOW = 1115, + ITEM_TEMPEST_SASH = 1116, + ITEM_DITTO_TORC = 1117, + ITEM_AI_BROOCH = 1118, + ITEM_SPIKE_BROOCH = 1119, + ITEM_AGED_SCARF = 1120, + ITEM_KABUTO_HAT = 1121, + ITEM_KABU_TORC = 1122, + ITEM_OLD_BROOCH = 1123, + ITEM_DRAGON_SASH = 1124, + ITEM_ALOFT_MANTLE = 1125, + ITEM_MIRAGE_CAPE = 1126, + ITEM_SENTRET_RUFF = 1127, + ITEM_BODY_COLLAR = 1128, + ITEM_EXPOSE_SPECS = 1129, + ITEM_NOCTOWL_TORC = 1130, + ITEM_MORNING_BOW = 1131, + ITEM_LEDIAN_BOW = 1132, + ITEM_SPINA_SCARF = 1133, + ITEM_ARIADOS_BOW = 1134, + ITEM_SLASH_BOW = 1135, + ITEM_SHINE_TORC = 1136, + ITEM_LANTURN_BOW = 1137, + ITEM_LIVELY_SCARF = 1138, + ITEM_XATU_BOW = 1139, + ITEM_WOOL_BOW = 1140, + ITEM_FLUFFY_SCARF = 1141, + ITEM_SACRED_SCARF = 1142, + ITEM_BRIGHT_TIARA = 1143, + ITEM_RAIN_CROWN = 1144, + ITEM_ZEPHYR_BOW = 1145, + ITEM_SKIP_SCARF = 1146, + ITEM_COTTON_TORC = 1147, + ITEM_REVENGE_RUFF = 1148, + ITEM_HASTY_BOW = 1149, + ITEM_SUN_SCARF = 1150, + ITEM_CHITIN_BOW = 1151, + ITEM_WOOPER_BOW = 1152, + ITEM_QUAG_TORC = 1153, + ITEM_MURKROW_HAT = 1154, + ITEM_KING_CAP = 1155, + ITEM_MISDREA_CAPE = 1156, + ITEM_CRYPTIC_SASH = 1157, + ITEM_REVERSE_BOW = 1158, + ITEM_ROBUST_BOW = 1159, + ITEM_DENSE_PONCHO = 1160, + ITEM_ESCAPE_SCARF = 1161, + ITEM_TAKEOFF_RUFF = 1162, + ITEM_QUARTZ_TORC = 1163, + ITEM_SNUB_CAPE = 1164, + ITEM_STERN_SASH = 1165, + ITEM_QWILFISH_BOW = 1166, + ITEM_SHUCKLE_BOW = 1167, + ITEM_HORN_TORC = 1168, + ITEM_LAVA_BOW = 1169, + ITEM_TORRID_SCARF = 1170, + ITEM_FRIGID_BOW = 1171, + ITEM_FROST_TORC = 1172, + ITEM_EAGER_BROOCH = 1173, + ITEM_REACH_BOW = 1174, + ITEM_PSY_BOW = 1175, + ITEM_SNOW_BROOCH = 1176, + ITEM_SKAR_CAPE = 1177, + ITEM_DARK_CHOKER = 1178, + ITEM_PIT_FANG = 1179, + ITEM_TORNADO_BOW = 1180, + ITEM_VIRTUAL_BOW = 1181, + ITEM_DELUSION_BOW = 1182, + ITEM_PAINT_SCARF = 1183, + ITEM_MILKY_SCARF = 1184, + ITEM_LARVITAR_BOW = 1185, + ITEM_PUPITA_SCARF = 1186, + ITEM_CRASH_CLAW = 1187, + ITEM_POOCH_COLLAR = 1188, + ITEM_DARK_FANG = 1189, + ITEM_MERRY_SCARF = 1190, + ITEM_LINOONE_RUFF = 1191, + ITEM_WURMPLE_BOW = 1192, + ITEM_TOUGH_SCARF = 1193, + ITEM_VIVID_SILK = 1194, + ITEM_GUARD_BOW = 1195, + ITEM_DUSTOX_BOW = 1196, + ITEM_KELP_HAT = 1197, + ITEM_JOLLY_SCARF = 1198, + ITEM_LUDICOLO_HAT = 1199, + ITEM_SEEDOT_HAT = 1200, + ITEM_NUZLEAF_BOW = 1201, + ITEM_SHIFTRY_BELT = 1202, + ITEM_TAILLOW_BOW = 1203, + ITEM_MIDAIR_SCARF = 1204, + ITEM_WINGULL_BOW = 1205, + ITEM_STOCK_SCARF = 1206, + ITEM_SENSING_HAT = 1207, + ITEM_MAGICAL_BOW = 1208, + ITEM_CARING_SCARF = 1209, + ITEM_BLISS_SCARF = 1210, + ITEM_BLOCKING_BOW = 1211, + ITEM_MOBILE_BOW = 1212, + ITEM_THWART_BOW = 1213, + ITEM_SLAK_SCARF = 1214, + ITEM_VIGOR_SASH = 1215, + ITEM_LAZY_RUFF = 1216, + ITEM_NOVICE_SCARF = 1217, + ITEM_NINJA_RUFF = 1218, + ITEM_AWE_MANTLE = 1219, + ITEM_GOOD_EARRING = 1220, + ITEM_NICE_BANGLE = 1221, + ITEM_GREAT_TORC = 1222, + ITEM_MAKUHIT_BELT = 1223, + ITEM_THRUST_BELT = 1224, + ITEM_NOSE_TORC = 1225, + ITEM_SABLE_SCOPE = 1226, + ITEM_DECEIT_MASK = 1227, + ITEM_IRON_TORC = 1228, + ITEM_METAL_BANGLE = 1229, + ITEM_IRON_HELMET = 1230, + ITEM_INTUIT_BOW = 1231, + ITEM_PONDER_SASH = 1232, + ITEM_PUNISH_TORC = 1233, + ITEM_PROTECT_MASK = 1234, + ITEM_NEON_SCARF = 1235, + ITEM_EVENING_BOW = 1236, + ITEM_THORNED_TORC = 1237, + ITEM_GULPIN_BOW = 1238, + ITEM_SWALOT_BELT = 1239, + ITEM_CARVA_SASH = 1240, + ITEM_VICIOUS_BOW = 1241, + ITEM_SPOUT_SCARF = 1242, + ITEM_HUGE_BOW = 1243, + ITEM_NUMEL_BOW = 1244, + ITEM_ERUPT_SCARF = 1245, + ITEM_SOOTY_SASH = 1246, + ITEM_SPRING_BOW = 1247, + ITEM_SCHEME_SCARF = 1248, + ITEM_HULA_BOW = 1249, + ITEM_DESERT_BOW = 1250, + ITEM_VIBRA_SCARF = 1251, + ITEM_RED_GLASSES = 1252, + ITEM_DESERT_SASH = 1253, + ITEM_CACTURNE_HAT = 1254, + ITEM_TUFT_BOW = 1255, + ITEM_CLOUD_RUFF = 1256, + ITEM_STRONG_SASH = 1257, + ITEM_SEVIPER_BOW = 1258, + ITEM_LUNATON_TORC = 1259, + ITEM_SOLROCK_BOW = 1260, + ITEM_SOAK_SCARF = 1261, + ITEM_WHISCASH_BOW = 1262, + ITEM_BOSSY_SCARF = 1263, + ITEM_COWER_SASH = 1264, + ITEM_BAL_BROOCH = 1265, + ITEM_CLAYDOL_TORC = 1266, + ITEM_BIND_SCARF = 1267, + ITEM_CRADILY_BOW = 1268, + ITEM_GUARD_CLAW = 1269, + ITEM_RIGID_CAPE = 1270, + ITEM_ADMIRE_SCARF = 1271, + ITEM_GRACE_SCARF = 1272, + ITEM_KECLEON_TORC = 1273, + ITEM_SHUPPET_CAPE = 1274, + ITEM_OMINOUS_TORC = 1275, + ITEM_DUSKULL_RUFF = 1276, + ITEM_ILLUSION_BOW = 1277, + ITEM_TROPIUS_BOW = 1278, + ITEM_CHIME_SCARF = 1279, + ITEM_PERISH_TORC = 1280, + ITEM_CHILLY_HAT = 1281, + ITEM_HAIL_SCARF = 1282, + ITEM_SLEET_BOW = 1283, + ITEM_SAFE_SCARF = 1284, + ITEM_WALREIN_TORC = 1285, + ITEM_CLAM_BROOCH = 1286, + ITEM_DEEP_TORC = 1287, + ITEM_GORE_SCARF = 1288, + ITEM_RELI_TORC = 1289, + ITEM_LUVDISC_TORC = 1290, + ITEM_CRAG_HELMET = 1291, + ITEM_OUTLAST_BOW = 1292, + ITEM_SALA_CAPE = 1293, + ITEM_BELDUM_TORC = 1294, + ITEM_METANG_SCARF = 1295, + ITEM_META_TORC = 1296, + ITEM_STARLY_BOW = 1297, + ITEM_REGRET_TORC = 1298, + ITEM_GUTS_SASH = 1299, + ITEM_STILL_BOW = 1300, + ITEM_KRICKE_TORC = 1301, + ITEM_BUDEW_SCARF = 1302, + ITEM_BOUQUET_CAPE = 1303, + ITEM_HARD_HELMET = 1304, + ITEM_SKULL_HELMET = 1305, + ITEM_REBOUND_BOW = 1306, + ITEM_BLOCK_BROOCH = 1307, + ITEM_STRAW_CAPE = 1308, + ITEM_WORMA_BOW = 1309, + ITEM_MOTHIM_BOW = 1310, + ITEM_NECTAR_BOW = 1311, + ITEM_VESPI_TORC = 1312, + ITEM_AWAKE_BOW = 1313, + ITEM_GASTRO_TORC = 1314, + ITEM_AMBIPOM_BOW = 1315, + ITEM_DEFROST_RUFF = 1316, + ITEM_ALLURE_COAT = 1317, + ITEM_MAGIC_HAT = 1318, + ITEM_HONCH_CAPE = 1319, + ITEM_GLAMEOW_BOW = 1320, + ITEM_SCARY_BELT = 1321, + ITEM_CHING_TORC = 1322, + ITEM_STINKY_SCARF = 1323, + ITEM_STENCH_SASH = 1324, + ITEM_IMAGE_BROOCH = 1325, + ITEM_MIRROR_TORC = 1326, + ITEM_CHATOT_SCARF = 1327, + ITEM_THICK_SCARF = 1328, + ITEM_GRIT_VEIL = 1329, + ITEM_SKORUPI_BOW = 1330, + ITEM_DUST_SCARF = 1331, + ITEM_CROA_TORC = 1332, + ITEM_TOXI_BELT = 1333, + ITEM_CARNI_BOW = 1334, + ITEM_SWIM_BOW = 1335, + ITEM_LUMI_TORC = 1336, + ITEM_SNOWY_TORC = 1337, + ITEM_FROZEN_CAPE = 1338, + ITEM_BUILDER_SASH = 1339, + ITEM_FLABBY_BELT = 1340, + ITEM_RHYPERI_TORC = 1341, + ITEM_CLINGING_BOW = 1342, + ITEM_YANMEGA_BOW = 1343, + ITEM_GLISCOR_CAPE = 1344, + ITEM_GLACIER_CAPE = 1345, + ITEM_BEST_SCARF = 1346, + ITEM_GALLANT_TORC = 1347, + ITEM_PROBO_HAT = 1348, + ITEM_UNLUCKY_SASH = 1349, + ITEM_FROSLASS_BOW = 1350, + ITEM_PURIFY_VEIL = 1351, + ITEM_UNNAMED_0x548 = 1352, + ITEM_UNNAMED_0x549 = 1353, + ITEM_UNNAMED_0x54A = 1354, + ITEM_UNNAMED_0x54B = 1355, + ITEM_UNNAMED_0x54C = 1356, + ITEM_UNNAMED_0x54D = 1357, + ITEM_UNNAMED_0x54E = 1358, + ITEM_UNNAMED_0x54F = 1359, + ITEM_UNNAMED_0x550 = 1360, + ITEM_UNNAMED_0x551 = 1361, + ITEM_UNNAMED_0x552 = 1362, + ITEM_UNNAMED_0x553 = 1363, + ITEM_UNNAMED_0x554 = 1364, + ITEM_UNNAMED_0x555 = 1365, + ITEM_UNNAMED_0x556 = 1366, + ITEM_UNNAMED_0x557 = 1367, + ITEM_UNNAMED_0x558 = 1368, + ITEM_UNNAMED_0x559 = 1369, + ITEM_UNNAMED_0x55A = 1370, + ITEM_UNNAMED_0x55B = 1371, + ITEM_UNNAMED_0x55C = 1372, + ITEM_UNNAMED_0x55D = 1373, + ITEM_UNNAMED_0x55E = 1374, + ITEM_UNNAMED_0x55F = 1375, + ITEM_UNNAMED_0x560 = 1376, + ITEM_UNNAMED_0x561 = 1377, + ITEM_UNNAMED_0x562 = 1378, + ITEM_UNNAMED_0x563 = 1379, + ITEM_UNNAMED_0x564 = 1380, + ITEM_UNNAMED_0x565 = 1381, + ITEM_UNNAMED_0x566 = 1382, + ITEM_UNNAMED_0x567 = 1383, + ITEM_UNNAMED_0x568 = 1384, + ITEM_UNNAMED_0x569 = 1385, + ITEM_UNNAMED_0x56A = 1386, + ITEM_UNNAMED_0x56B = 1387, + ITEM_UNNAMED_0x56C = 1388, + ITEM_UNNAMED_0x56D = 1389, + ITEM_UNNAMED_0x56E = 1390, + ITEM_UNNAMED_0x56F = 1391, + ITEM_UNNAMED_0x570 = 1392, + ITEM_UNNAMED_0x571 = 1393, + ITEM_UNNAMED_0x572 = 1394, + ITEM_UNNAMED_0x573 = 1395, + ITEM_UNNAMED_0x574 = 1396, + ITEM_UNNAMED_0x575 = 1397, + ITEM_UNNAMED_0x576 = 1398, + ITEM_UNNAMED_0x577 = 1399, +}; + + +// Move ID +enum move_id { + MOVE_NOTHING = 0, + MOVE_IRON_TAIL = 1, + MOVE_ICE_BALL = 2, + MOVE_YAWN = 3, + MOVE_LOVELY_KISS = 4, + MOVE_NIGHTMARE = 5, + MOVE_MORNING_SUN = 6, + MOVE_VITAL_THROW = 7, + MOVE_DIG = 8, + MOVE_THRASH = 9, + MOVE_SWEET_SCENT = 10, + MOVE_CHARM = 11, + MOVE_RAIN_DANCE = 12, + MOVE_CONFUSE_RAY = 13, + MOVE_HAIL = 14, + MOVE_AROMATHERAPY = 15, + MOVE_BUBBLE = 16, + MOVE_ENCORE = 17, + MOVE_CUT = 18, + MOVE_RAGE = 19, + MOVE_SUPER_FANG = 20, + MOVE_PAIN_SPLIT = 21, + MOVE_TORMENT = 22, + MOVE_STRING_SHOT = 23, + MOVE_SWAGGER = 24, + MOVE_SNORE = 25, + MOVE_HEAL_BELL = 26, + MOVE_SCREECH = 27, + MOVE_ROCK_THROW = 28, + MOVE_ROCK_SMASH = 29, + MOVE_ROCK_SLIDE = 30, + MOVE_WEATHER_BALL = 31, + MOVE_WHIRLPOOL = 32, + MOVE_FAKE_TEARS = 33, + MOVE_SING = 34, + MOVE_SPITE = 35, + MOVE_AIR_CUTTER = 36, + MOVE_SMOKESCREEN = 37, + MOVE_PURSUIT = 38, + MOVE_DOUBLESLAP = 39, + MOVE_MIRROR_MOVE = 40, + MOVE_OVERHEAT = 41, + MOVE_AURORA_BEAM = 42, + MOVE_MEMENTO = 43, + MOVE_OCTAZOOKA = 44, + MOVE_FLATTER = 45, + MOVE_ASTONISH = 46, + MOVE_WILL_O_WISP = 47, + MOVE_RETURN = 48, + MOVE_GRUDGE = 49, + MOVE_STRENGTH = 50, + MOVE_COUNTER = 51, + MOVE_FLAME_WHEEL = 52, + MOVE_FLAMETHROWER = 53, + MOVE_ODOR_SLEUTH = 54, + MOVE_SHARPEN = 55, + MOVE_DOUBLE_TEAM = 56, + MOVE_GUST = 57, + MOVE_HARDEN = 58, + MOVE_DISABLE = 59, + MOVE_RAZOR_WIND = 60, + MOVE_BIDE = 61, + MOVE_CRUNCH = 62, + MOVE_BITE = 63, + MOVE_THUNDER = 64, + MOVE_THUNDERPUNCH = 65, + MOVE_ENDEAVOR = 66, + MOVE_FACADE = 67, + MOVE_KARATE_CHOP = 68, + MOVE_CLAMP = 69, + MOVE_WITHDRAW = 70, + MOVE_CONSTRICT = 71, + MOVE_BRICK_BREAK = 72, + MOVE_ROCK_TOMB = 73, + MOVE_FOCUS_ENERGY = 74, + MOVE_FOCUS_PUNCH = 75, + MOVE_GIGA_DRAIN = 76, + MOVE_REVERSAL = 77, + MOVE_SMELLINGSALT = 78, + MOVE_SPORE = 79, + MOVE_LEECH_LIFE = 80, + MOVE_SLASH = 81, + MOVE_SILVER_WIND = 82, + MOVE_METAL_SOUND = 83, + MOVE_GRASSWHISTLE = 84, + MOVE_TICKLE = 85, + MOVE_SPIDER_WEB = 86, + MOVE_CRABHAMMER = 87, + MOVE_HAZE = 88, + MOVE_MEAN_LOOK = 89, + MOVE_CROSS_CHOP = 90, + MOVE_OUTRAGE = 91, + MOVE_LOW_KICK = 92, + MOVE_ANCIENTPOWER = 93, + MOVE_SYNTHESIS = 94, + MOVE_AGILITY = 95, + MOVE_RAPID_SPIN = 96, + MOVE_ICY_WIND = 97, + MOVE_MIND_READER = 98, + MOVE_COSMIC_POWER = 99, + MOVE_SKY_ATTACK = 100, + MOVE_POWDER_SNOW = 101, + MOVE_FOLLOW_ME = 102, + MOVE_METEOR_MASH = 103, + MOVE_ENDURE = 104, + MOVE_ROLLOUT = 105, + MOVE_SCARY_FACE = 106, + MOVE_PSYBEAM = 107, + MOVE_PSYWAVE = 108, + MOVE_PSYCHIC = 109, + MOVE_PSYCHO_BOOST = 110, + MOVE_HYPNOSIS = 111, + MOVE_UPROAR = 112, + MOVE_WATER_SPOUT = 113, + MOVE_SIGNAL_BEAM = 114, + MOVE_PSYCH_UP = 115, + MOVE_SUBMISSION = 116, + MOVE_RECOVER = 117, + MOVE_EARTHQUAKE = 118, + MOVE_NATURE_POWER = 119, + MOVE_LICK = 120, + MOVE_FLAIL = 121, + MOVE_TAIL_WHIP = 122, + MOVE_SELFDESTRUCT = 123, + MOVE_STUN_SPORE = 124, + MOVE_BIND = 125, + MOVE_SHADOW_PUNCH = 126, + MOVE_SHADOW_BALL = 127, + MOVE_CHARGE = 128, + MOVE_THUNDERBOLT = 129, + MOVE_MIST = 130, + MOVE_FISSURE = 131, + MOVE_EXTREMESPEED = 132, + MOVE_EXTRASENSORY = 133, + MOVE_SAFEGUARD = 134, + MOVE_ABSORB = 135, + MOVE_SKY_UPPERCUT = 136, + MOVE_SKILL_SWAP = 137, + MOVE_SKETCH = 138, + MOVE_HEADBUTT = 139, + MOVE_DOUBLE_EDGE = 140, + MOVE_SANDSTORM = 141, + MOVE_SAND_ATTACK = 142, + MOVE_SAND_TOMB = 143, + MOVE_SPARK = 144, + MOVE_SWIFT = 145, + MOVE_KINESIS = 146, + MOVE_SMOG = 147, + MOVE_GROWTH = 148, + MOVE_SACRED_FIRE = 149, + MOVE_SHEER_COLD = 150, + MOVE_SOLARBEAM = 151, + MOVE_SONICBOOM = 152, + MOVE_FLY = 153, + MOVE_TACKLE = 154, + MOVE_EXPLOSION = 155, + MOVE_DIVE = 156, + MOVE_FIRE_BLAST = 157, + MOVE_WATERFALL = 158, + MOVE_MUDDY_WATER = 159, + MOVE_STOCKPILE = 160, + MOVE_SLAM = 161, + MOVE_TWISTER = 162, + MOVE_BULLET_SEED = 163, + MOVE_TWINEEDLE = 164, + MOVE_SOFTBOILED = 165, + MOVE_EGG_BOMB = 166, + MOVE_FAINT_ATTACK = 167, + MOVE_BARRAGE = 168, + MOVE_MINIMIZE = 169, + MOVE_SEISMIC_TOSS = 170, + MOVE_SUPERSONIC = 171, + MOVE_TAUNT = 172, + MOVE_MOONLIGHT = 173, + MOVE_PECK = 174, + MOVE_ARM_THRUST = 175, + MOVE_HORN_ATTACK = 176, + MOVE_HORN_DRILL = 177, + MOVE_WING_ATTACK = 178, + MOVE_AERIAL_ACE = 179, + MOVE_ICICLE_SPEAR = 180, + MOVE_SWORDS_DANCE = 181, + MOVE_VINE_WHIP = 182, + MOVE_CONVERSION = 183, + MOVE_CONVERSION_2 = 184, + MOVE_HELPING_HAND = 185, + MOVE_IRON_DEFENSE = 186, + MOVE_TELEPORT = 187, + MOVE_THUNDERSHOCK = 188, + MOVE_SHOCK_WAVE = 189, + MOVE_QUICK_ATTACK = 190, + MOVE_SWEET_KISS = 191, + MOVE_THUNDER_WAVE = 192, + MOVE_ZAP_CANNON = 193, + MOVE_BLOCK = 194, + MOVE_HOWL = 195, + MOVE_POISON_GAS = 196, + MOVE_TOXIC = 197, + MOVE_POISON_FANG = 198, + MOVE_POISONPOWDER = 199, + MOVE_POISON_STING = 200, + MOVE_SPIKE_CANNON = 201, + MOVE_ACID_ARMOR = 202, + MOVE_TAKE_DOWN = 203, + MOVE_JUMP_KICK = 204, + MOVE_BOUNCE = 205, + MOVE_HI_JUMP_KICK = 206, + MOVE_TRI_ATTACK = 207, + MOVE_DRAGON_CLAW = 208, + MOVE_TRICK = 209, + MOVE_TRIPLE_KICK = 210, + MOVE_DRILL_PECK = 211, + MOVE_MUD_SPORT = 212, + MOVE_MUD_SLAP = 213, + MOVE_THIEF = 214, + MOVE_AMNESIA = 215, + MOVE_NIGHT_SHADE = 216, + MOVE_GROWL = 217, + MOVE_SLACK_OFF = 218, + MOVE_SURF = 219, + MOVE_ROLE_PLAY = 220, + MOVE_NEEDLE_ARM = 221, + MOVE_DOUBLE_KICK = 222, + MOVE_SUNNY_DAY = 223, + MOVE_LEER = 224, + MOVE_WISH = 225, + MOVE_FAKE_OUT = 226, + MOVE_SLEEP_TALK = 227, + MOVE_PAY_DAY = 228, + MOVE_ASSIST = 229, + MOVE_HEAT_WAVE = 230, + MOVE_SLEEP_POWDER = 231, + MOVE_REST = 232, + MOVE_INGRAIN = 233, + MOVE_CONFUSION = 234, + MOVE_BODY_SLAM = 235, + MOVE_SWALLOW = 236, + MOVE_CURSE = 237, + MOVE_FRENZY_PLANT = 238, + MOVE_HYDRO_CANNON = 239, + MOVE_HYDRO_PUMP = 240, + MOVE_HYPER_VOICE = 241, + MOVE_HYPER_BEAM = 242, + MOVE_SUPERPOWER = 243, + MOVE_STEEL_WING = 244, + MOVE_SPIT_UP = 245, + MOVE_DYNAMICPUNCH = 246, + MOVE_GUILLOTINE = 247, + MOVE_VICEGRIP = 248, + MOVE_KNOCK_OFF = 249, + MOVE_POUND = 250, + MOVE_RAZOR_LEAF = 251, + MOVE_BATON_PASS = 252, + MOVE_PETAL_DANCE = 253, + MOVE_SPLASH = 254, + MOVE_BUBBLEBEAM = 255, + MOVE_DOOM_DESIRE = 256, + MOVE_BELLY_DRUM = 257, + MOVE_BARRIER = 258, + MOVE_LIGHT_SCREEN = 259, + MOVE_SCRATCH = 260, + MOVE_HYPER_FANG = 261, + MOVE_EMBER = 262, + MOVE_SECRET_POWER = 263, + MOVE_DIZZY_PUNCH = 264, + MOVE_BULK_UP = 265, + MOVE_IMPRISON = 266, + MOVE_FEATHERDANCE = 267, + MOVE_WHIRLWIND = 268, + MOVE_BEAT_UP = 269, + MOVE_BLIZZARD = 270, + MOVE_STOMP = 271, + MOVE_BLAST_BURN = 272, + MOVE_FLASH = 273, + MOVE_TEETER_DANCE = 274, + MOVE_CRUSH_CLAW = 275, + MOVE_BLAZE_KICK = 276, + MOVE_PRESENT = 277, + MOVE_ERUPTION = 278, + MOVE_SLUDGE = 279, + MOVE_SLUDGE_BOMB = 280, + MOVE_GLARE = 281, + MOVE_TRANSFORM = 282, + MOVE_POISON_TAIL = 283, + MOVE_ROAR = 284, + MOVE_BONE_RUSH = 285, + MOVE_CAMOUFLAGE = 286, + MOVE_COVET = 287, + MOVE_TAIL_GLOW = 288, + MOVE_BONE_CLUB = 289, + MOVE_BONEMERANG = 290, + MOVE_FIRE_SPIN = 291, + MOVE_FIRE_PUNCH = 292, + MOVE_PERISH_SONG = 293, + MOVE_WRAP = 294, + MOVE_SPIKES = 295, + MOVE_MAGNITUDE = 296, + MOVE_MAGICAL_LEAF = 297, + MOVE_MAGIC_COAT = 298, + MOVE_MUD_SHOT = 299, + MOVE_MACH_PUNCH = 300, + MOVE_PROTECT = 301, + MOVE_DEFENSE_CURL = 302, + MOVE_ROLLING_KICK = 303, + MOVE_SUBSTITUTE = 304, + MOVE_DETECT = 305, + MOVE_PIN_MISSILE = 306, + MOVE_WATER_SPORT = 307, + MOVE_WATER_GUN = 308, + MOVE_MIST_BALL = 309, + MOVE_WATER_PULSE = 310, + MOVE_FURY_ATTACK = 311, + MOVE_FURY_SWIPES = 312, + MOVE_DESTINY_BOND = 313, + MOVE_FALSE_SWIPE = 314, + MOVE_FORESIGHT = 315, + MOVE_MIRROR_COAT = 316, + MOVE_FUTURE_SIGHT = 317, + MOVE_MILK_DRINK = 318, + MOVE_CALM_MIND = 319, + MOVE_MEGA_DRAIN = 320, + MOVE_MEGA_KICK = 321, + MOVE_MEGA_PUNCH = 322, + MOVE_MEGAHORN = 323, + MOVE_HIDDEN_POWER = 324, + MOVE_METAL_CLAW = 325, + MOVE_ATTRACT = 326, + MOVE_MIMIC = 327, + MOVE_FRUSTRATION = 328, + MOVE_LEECH_SEED = 329, + MOVE_METRONOME = 330, + MOVE_DREAM_EATER = 331, + MOVE_ACID = 332, + MOVE_MEDITATE = 333, + MOVE_SNATCH = 334, + MOVE_LUSTER_PURGE = 335, + MOVE_LEAF_BLADE = 336, + MOVE_RECYCLE = 337, + MOVE_REFLECT = 338, + MOVE_REFRESH = 339, + MOVE_REVENGE = 340, + MOVE_DRAGON_RAGE = 341, + MOVE_DRAGONBREATH = 342, + MOVE_DRAGON_DANCE = 343, + MOVE_ICE_PUNCH = 344, + MOVE_ICE_BEAM = 345, + MOVE_FURY_CUTTER = 346, + MOVE_COMET_PUNCH = 347, + MOVE_SKULL_BASH = 348, + MOVE_LOCK_ON = 349, + MOVE_ROCK_BLAST = 350, + MOVE_COTTON_SPORE = 351, + MOVE_STRUGGLE = 352, + MOVE_AEROBLAST = 353, + MOVE_VOLT_TACKLE = 354, + MOVE_REGULAR_ATTACK = 355, + MOVE_IS_WATCHING = 356, + MOVE_BIDE_UNLEASH = 357, + MOVE_REVENGE_UNLEASH = 358, + MOVE_AVALANCHE_UNLEASH = 359, + MOVE_WIDE_SLASH = 360, + MOVE_UNNAMED_0x169 = 361, + MOVE_UNNAMED_0x16A = 362, + MOVE_SEE_TRAP = 363, + MOVE_TAKEAWAY = 364, + MOVE_REBOUND = 365, + MOVE_BLOOP_SLASH = 366, + MOVE_SWITCHER = 367, + MOVE_BLOWBACK = 368, + MOVE_WARP = 369, + MOVE_TRANSFER = 370, + MOVE_SLOW_DOWN = 371, + MOVE_SPEED_BOOST = 372, + MOVE_SEARCHLIGHT = 373, + MOVE_PETRIFY = 374, + MOVE_STAY_AWAY = 375, + MOVE_POUNCE = 376, + MOVE_TRAWL = 377, + MOVE_CLEANSE = 378, + MOVE_OBSERVER = 379, + MOVE_DECOY_MAKER = 380, + MOVE_SIESTA = 381, + MOVE_TOTTER = 382, + MOVE_TWO_EDGE = 383, + MOVE_NO_MOVE = 384, + MOVE_ESCAPE = 385, + MOVE_SCAN = 386, + MOVE_POWER_EARS = 387, + MOVE_DROUGHT = 388, + MOVE_TRAP_BUSTER = 389, + MOVE_WILD_CALL = 390, + MOVE_INVISIFY = 391, + MOVE_ONE_SHOT = 392, + MOVE_HP_GAUGE = 393, + MOVE_VACUUM_CUT = 394, + MOVE_REVIVER = 395, + MOVE_SHOCKER = 396, + MOVE_ECHO = 397, + MOVE_FAMISH = 398, + MOVE_ONE_ROOM = 399, + MOVE_FILL_IN = 400, + MOVE_TRAPPER = 401, + MOVE_POSSESS = 402, + MOVE_ITEMIZE = 403, + MOVE_TAG_0x194 = 404, + MOVE_PROJECTILE = 405, + MOVE_HURL = 406, + MOVE_MOBILE = 407, + MOVE_ITEM_TOSS = 408, + MOVE_SEE_STAIRS = 409, + MOVE_LONG_TOSS = 410, + MOVE_TAG_0x19B = 411, + MOVE_PIERCE = 412, + MOVE_TAG_0x19D = 413, + MOVE_TAG_0x19E = 414, + MOVE_TAG_0x19F = 415, + MOVE_TAG_0x1A0 = 416, + MOVE_TAG_0x1A1 = 417, + MOVE_TAG_0x1A2 = 418, + MOVE_TAG_0x1A3 = 419, + MOVE_TAG_0x1A4 = 420, + MOVE_TAG_0x1A5 = 421, + MOVE_TAG_0x1A6 = 422, + MOVE_TAG_0x1A7 = 423, + MOVE_TAG_0x1A8 = 424, + MOVE_TAG_0x1A9 = 425, + MOVE_TAG_0x1AA = 426, + MOVE_TAG_0x1AB = 427, + MOVE_TAG_0x1AC = 428, + MOVE_TAG_0x1AD = 429, + MOVE_HAMMER_ARM = 430, + MOVE_IRON_HEAD = 431, + MOVE_AQUA_JET = 432, + MOVE_AQUA_TAIL = 433, + MOVE_AQUA_RING = 434, + MOVE_SPACIAL_REND = 435, + MOVE_DARK_PULSE = 436, + MOVE_OMINOUS_WIND = 437, + MOVE_GASTRO_ACID = 438, + MOVE_HEALING_WISH = 439, + MOVE_CLOSE_COMBAT = 440, + MOVE_WOOD_HAMMER = 441, + MOVE_AIR_SLASH = 442, + MOVE_ENERGY_BALL = 443, + MOVE_TAILWIND = 444, + MOVE_PUNISHMENT = 445, + MOVE_CHATTER = 446, + MOVE_LUCKY_CHANT = 447, + MOVE_GUARD_SWAP = 448, + MOVE_HEAL_ORDER = 449, + MOVE_HEAL_BLOCK = 450, + MOVE_SHADOW_SNEAK = 451, + MOVE_THUNDER_FANG = 452, + MOVE_ROCK_WRECKER = 453, + MOVE_FOCUS_BLAST = 454, + MOVE_GIGA_IMPACT = 455, + MOVE_DEFOG = 456, + MOVE_TRUMP_CARD = 457, + MOVE_GRASS_KNOT = 458, + MOVE_CROSS_POISON = 459, + MOVE_ATTACK_ORDER = 460, + MOVE_ICE_FANG = 461, + MOVE_ICE_SHARD = 462, + MOVE_PSYCHO_CUT = 463, + MOVE_PSYCHO_SHIFT = 464, + MOVE_ME_FIRST = 465, + MOVE_EMBARGO = 466, + MOVE_JUDGMENT = 467, + MOVE_SEED_FLARE = 468, + MOVE_BRINE = 469, + MOVE_X_SCISSOR = 470, + MOVE_NATURAL_GIFT = 471, + MOVE_PAYBACK = 472, + MOVE_ZEN_HEADBUTT = 473, + MOVE_WRING_OUT = 474, + MOVE_GYRO_BALL = 475, + MOVE_SHADOW_CLAW = 476, + MOVE_SHADOW_FORCE = 477, + MOVE_GRAVITY = 478, + MOVE_VACUUM_WAVE = 479, + MOVE_STEALTH_ROCK = 480, + MOVE_STONE_EDGE = 481, + MOVE_SWITCHEROO = 482, + MOVE_DARK_VOID = 483, + MOVE_EARTH_POWER = 484, + MOVE_GUNK_SHOT = 485, + MOVE_SEED_BOMB = 486, + MOVE_DOUBLE_HIT = 487, + MOVE_ASSURANCE = 488, + MOVE_CHARGE_BEAM = 489, + MOVE_PLUCK = 490, + MOVE_NIGHT_SLASH = 491, + MOVE_ACUPRESSURE = 492, + MOVE_MAGNET_RISE = 493, + MOVE_ROAR_OF_TIME = 494, + MOVE_POISON_JAB = 495, + MOVE_TOXIC_SPIKES = 496, + MOVE_LAST_RESORT = 497, + MOVE_DRAGON_RUSH = 498, + MOVE_TRICK_ROOM = 499, + MOVE_DRAIN_PUNCH = 500, + MOVE_MUD_BOMB = 501, + MOVE_U_TURN = 502, + MOVE_FLING = 503, + MOVE_WORRY_SEED = 504, + MOVE_CRUSH_GRIP = 505, + MOVE_HEART_SWAP = 506, + MOVE_FORCE_PALM = 507, + MOVE_AURA_SPHERE = 508, + MOVE_ROOST = 509, + MOVE_BULLET_PUNCH = 510, + MOVE_POWER_WHIP = 511, + MOVE_POWER_GEM = 512, + MOVE_POWER_SWAP = 513, + MOVE_POWER_TRICK = 514, + MOVE_SUCKER_PUNCH = 515, + MOVE_FEINT = 516, + MOVE_FLARE_BLITZ = 517, + MOVE_BRAVE_BIRD = 518, + MOVE_LAVA_PLUME = 519, + MOVE_DEFEND_ORDER = 520, + MOVE_DISCHARGE = 521, + MOVE_FIRE_FANG = 522, + MOVE_MAGNET_BOMB = 523, + MOVE_MAGMA_STORM = 524, + MOVE_COPYCAT = 525, + MOVE_LUNAR_DANCE = 526, + MOVE_MIRROR_SHOT = 527, + MOVE_MIRACLE_EYE = 528, + MOVE_BUG_BITE = 529, + MOVE_BUG_BUZZ = 530, + MOVE_WAKE_UP_SLAP = 531, + MOVE_METAL_BURST = 532, + MOVE_HEAD_SMASH = 533, + MOVE_CAPTIVATE = 534, + MOVE_AVALANCHE = 535, + MOVE_FLASH_CANNON = 536, + MOVE_LEAF_STORM = 537, + MOVE_DRACO_METEOR = 538, + MOVE_DRAGON_PULSE = 539, + MOVE_ROCK_POLISH = 540, + MOVE_ROCK_CLIMB = 541, + MOVE_NASTY_PLOT = 542, + MOVE_TAG_0x21F = 543, + MOVE_TAG_0x220 = 544, + MOVE_TAG_0x221 = 545, + MOVE_TAG_0x222 = 546, + MOVE_TAG_0x223 = 547, + MOVE_TAG_0x224 = 548, + MOVE_TAG_0x225 = 549, + MOVE_TAG_0x226 = 550, + MOVE_TAG_0x227 = 551, + MOVE_TAG_0x228 = 552, + MOVE_TAG_0x229 = 553, + MOVE_TAG_0x22A = 554, + MOVE_TAG_0x22B = 555, + MOVE_TAG_0x22C = 556, + MOVE_TAG_0x22D = 557, + MOVE_TAG_0x22E = 558, +}; + +// Ability ID +enum ability_id { + ABILITY_UNKNOWN = 0, + ABILITY_STENCH = 1, + ABILITY_THICK_FAT = 2, + ABILITY_RAIN_DISH = 3, + ABILITY_DRIZZLE = 4, + ABILITY_ARENA_TRAP = 5, + ABILITY_INTIMIDATE = 6, + ABILITY_ROCK_HEAD = 7, + ABILITY_AIR_LOCK = 8, + ABILITY_HYPER_CUTTER = 9, + ABILITY_SHADOW_TAG = 10, + ABILITY_SPEED_BOOST = 11, + ABILITY_BATTLE_ARMOR = 12, + ABILITY_STURDY = 13, + ABILITY_SUCTION_CUPS = 14, + ABILITY_CLEAR_BODY = 15, + ABILITY_TORRENT = 16, + ABILITY_GUTS = 17, + ABILITY_ROUGH_SKIN = 18, + ABILITY_SHELL_ARMOR = 19, + ABILITY_NATURAL_CURE = 20, + ABILITY_DAMP = 21, + ABILITY_LIMBER = 22, + ABILITY_MAGNET_PULL = 23, + ABILITY_WHITE_SMOKE = 24, + ABILITY_SYNCHRONIZE = 25, + ABILITY_OVERGROW = 26, + ABILITY_SWIFT_SWIM = 27, + ABILITY_SAND_STREAM = 28, + ABILITY_SAND_VEIL = 29, + ABILITY_KEEN_EYE = 30, + ABILITY_INNER_FOCUS = 31, + ABILITY_STATIC = 32, + ABILITY_SHED_SKIN = 33, + ABILITY_HUGE_POWER = 34, + ABILITY_VOLT_ABSORB = 35, + ABILITY_WATER_ABSORB = 36, + ABILITY_FORECAST = 37, + ABILITY_SERENE_GRACE = 38, + ABILITY_POISON_POINT = 39, + ABILITY_TRACE = 40, + ABILITY_OBLIVIOUS = 41, + ABILITY_TRUANT = 42, + ABILITY_RUN_AWAY = 43, + ABILITY_STICKY_HOLD = 44, + ABILITY_CLOUD_NINE = 45, + ABILITY_ILLUMINATE = 46, + ABILITY_EARLY_BIRD = 47, + ABILITY_HUSTLE = 48, + ABILITY_DROUGHT = 49, + ABILITY_LIGHTNINGROD = 50, + ABILITY_COMPOUNDEYES = 51, + ABILITY_MARVEL_SCALE = 52, + ABILITY_WONDER_GUARD = 53, + ABILITY_INSOMNIA = 54, + ABILITY_LEVITATE = 55, + ABILITY_PLUS = 56, + ABILITY_PRESSURE = 57, + ABILITY_LIQUID_OOZE = 58, + ABILITY_COLOR_CHANGE = 59, + ABILITY_SOUNDPROOF = 60, + ABILITY_EFFECT_SPORE = 61, + ABILITY_FLAME_BODY = 62, + ABILITY_MINUS = 63, + ABILITY_OWN_TEMPO = 64, + ABILITY_MAGMA_ARMOR = 65, + ABILITY_WATER_VEIL = 66, + ABILITY_SWARM = 67, + ABILITY_CUTE_CHARM = 68, + ABILITY_IMMUNITY = 69, + ABILITY_BLAZE = 70, + ABILITY_PICKUP = 71, + ABILITY_FLASH_FIRE = 72, + ABILITY_VITAL_SPIRIT = 73, + ABILITY_CHLOROPHYLL = 74, + ABILITY_PURE_POWER = 75, + ABILITY_SHIELD_DUST = 76, + ABILITY_ICE_BODY = 77, + ABILITY_STALL = 78, + ABILITY_ANGER_POINT = 79, + ABILITY_TINTED_LENS = 80, + ABILITY_HYDRATION = 81, + ABILITY_FRISK = 82, + ABILITY_MOLD_BREAKER = 83, + ABILITY_UNBURDEN = 84, + ABILITY_DRY_SKIN = 85, + ABILITY_ANTICIPATION = 86, + ABILITY_SCRAPPY = 87, + ABILITY_SUPER_LUCK = 88, + ABILITY_GLUTTONY = 89, + ABILITY_SOLAR_POWER = 90, + ABILITY_SKILL_LINK = 91, + ABILITY_RECKLESS = 92, + ABILITY_SNIPER = 93, + ABILITY_SLOW_START = 94, + ABILITY_HEATPROOF = 95, + ABILITY_DOWNLOAD = 96, + ABILITY_SIMPLE = 97, + ABILITY_TANGLED_FEET = 98, + ABILITY_ADAPTABILITY = 99, + ABILITY_TECHNICIAN = 100, + ABILITY_IRON_FIST = 101, + ABILITY_MOTOR_DRIVE = 102, + ABILITY_UNAWARE = 103, + ABILITY_RIVALRY = 104, + ABILITY_BAD_DREAMS = 105, + ABILITY_NO_GUARD = 106, + ABILITY_NORMALIZE = 107, + ABILITY_SOLID_ROCK = 108, + ABILITY_QUICK_FEET = 109, + ABILITY_FILTER = 110, + ABILITY_KLUTZ = 111, + ABILITY_STEADFAST = 112, + ABILITY_FLOWER_GIFT = 113, + ABILITY_POISON_HEAL = 114, + ABILITY_MAGIC_GUARD = 115, + ABILITY_MULTITYPE = 116, // Named "$$$" in game in NA/EU + ABILITY_HONEY_GATHER = 117, + ABILITY_AFTERMATH = 118, + ABILITY_SNOW_CLOAK = 119, + ABILITY_SNOW_WARNING = 120, + ABILITY_FOREWARN = 121, + ABILITY_STORM_DRAIN = 122, + ABILITY_LEAF_GUARD = 123, +}; + +// Dungeon ID. +// Each "section" of what we would normally consider "one dungeon" has its own ID. Many of the +// later dungeon IDs are not actual dungeons, and are used for the "Joined at" field for teammates +enum dungeon_id { + DUNGEON_TEST_DUNGEON = 0, + DUNGEON_BEACH_CAVE = 1, + DUNGEON_BEACH_CAVE_PIT = 2, + DUNGEON_DRENCHED_BLUFF = 3, + DUNGEON_MT_BRISTLE = 4, + DUNGEON_MT_BRISTLE_PEAK = 5, + DUNGEON_WATERFALL_CAVE = 6, + DUNGEON_APPLE_WOODS = 7, + DUNGEON_CRAGGY_COAST = 8, + DUNGEON_SIDE_PATH = 9, + DUNGEON_MT_HORN = 10, + DUNGEON_ROCK_PATH = 11, + DUNGEON_FOGGY_FOREST = 12, + DUNGEON_FOREST_PATH = 13, + DUNGEON_STEAM_CAVE = 14, + DUNGEON_UPPER_STEAM_CAVE = 15, + DUNGEON_STEAM_CAVE_PEAK = 16, + DUNGEON_AMP_PLAINS = 17, + DUNGEON_FAR_AMP_PLAINS = 18, + DUNGEON_AMP_CLEARING = 19, + DUNGEON_NORTHERN_DESERT = 20, + DUNGEON_QUICKSAND_CAVE = 21, + DUNGEON_QUICKSAND_PIT = 22, + DUNGEON_UNDERGROUND_LAKE = 23, + DUNGEON_CRYSTAL_CAVE = 24, + DUNGEON_CRYSTAL_CROSSING = 25, + DUNGEON_CRYSTAL_LAKE = 26, + DUNGEON_CHASM_CAVE = 27, + DUNGEON_DARK_HILL = 28, + DUNGEON_SEALED_RUIN = 29, + DUNGEON_DEEP_SEALED_RUIN = 30, + DUNGEON_SEALED_RUIN_PIT = 31, + DUNGEON_DUSK_FOREST = 32, + DUNGEON_DEEP_DUSK_FOREST = 33, + DUNGEON_TREESHROUD_FOREST = 34, + DUNGEON_BRINE_CAVE = 35, + DUNGEON_LOWER_BRINE_CAVE = 36, + DUNGEON_BRINE_CAVE_PIT = 37, + DUNGEON_HIDDEN_LAND = 38, + DUNGEON_HIDDEN_HIGHLAND = 39, + DUNGEON_OLD_RUINS = 40, + DUNGEON_TEMPORAL_TOWER = 41, + DUNGEON_TEMPORAL_SPIRE = 42, + DUNGEON_TEMPORAL_PINNACLE = 43, + DUNGEON_MYSTIFYING_FOREST = 44, + DUNGEON_MYSTIFYING_FOREST_CLEARING = 45, + DUNGEON_BLIZZARD_ISLAND = 46, + DUNGEON_CREVICE_CAVE = 47, + DUNGEON_LOWER_CREVICE_CAVE = 48, + DUNGEON_CREVICE_CAVE_PIT = 49, + DUNGEON_SURROUNDED_SEA = 50, + DUNGEON_MIRACLE_SEA = 51, + DUNGEON_DEEP_MIRACLE_SEA = 52, + DUNGEON_MIRACLE_SEABED = 53, + DUNGEON_ICE_AEGIS_CAVE = 54, + DUNGEON_REGICE_CHAMBER = 55, + DUNGEON_ROCK_AEGIS_CAVE = 56, + DUNGEON_REGIROCK_CHAMBER = 57, + DUNGEON_STEEL_AEGIS_CAVE = 58, + DUNGEON_REGISTEEL_CHAMBER = 59, + DUNGEON_AEGIS_CAVE_PIT = 60, + DUNGEON_REGIGIGAS_CHAMBER = 61, + DUNGEON_MT_TRAVAIL = 62, + DUNGEON_THE_NIGHTMARE = 63, + DUNGEON_SPACIAL_RIFT = 64, + DUNGEON_DEEP_SPACIAL_RIFT = 65, + DUNGEON_SPACIAL_RIFT_BOTTOM = 66, + DUNGEON_DARK_CRATER = 67, + DUNGEON_DEEP_DARK_CRATER = 68, + DUNGEON_DARK_CRATER_PIT = 69, + DUNGEON_CONCEALED_RUINS = 70, + DUNGEON_DEEP_CONCEALED_RUINS = 71, + DUNGEON_MARINE_RESORT = 72, + DUNGEON_BOTTOMLESS_SEA = 73, + DUNGEON_BOTTOMLESS_SEA_DEPTHS = 74, + DUNGEON_SHIMMER_DESERT = 75, + DUNGEON_SHIMMER_DESERT_PIT = 76, + DUNGEON_MT_AVALANCHE = 77, + DUNGEON_MT_AVALANCHE_PEAK = 78, + DUNGEON_GIANT_VOLCANO = 79, + DUNGEON_GIANT_VOLCANO_PEAK = 80, + DUNGEON_WORLD_ABYSS = 81, + DUNGEON_WORLD_ABYSS_PIT = 82, + DUNGEON_SKY_STAIRWAY = 83, + DUNGEON_SKY_STAIRWAY_APEX = 84, + DUNGEON_MYSTERY_JUNGLE = 85, + DUNGEON_DEEP_MYSTERY_JUNGLE = 86, + DUNGEON_SERENITY_RIVER = 87, + DUNGEON_LANDSLIDE_CAVE = 88, + DUNGEON_LUSH_PRAIRIE = 89, + DUNGEON_TINY_MEADOW = 90, + DUNGEON_LABYRINTH_CAVE = 91, + DUNGEON_ORAN_FOREST = 92, + DUNGEON_LAKE_AFAR = 93, + DUNGEON_HAPPY_OUTLOOK = 94, + DUNGEON_MY_MISTRAL = 95, + DUNGEON_SHIMMER_HILL = 96, + DUNGEON_LOST_WILDERNESS = 97, + DUNGEON_MIDNIGHT_FOREST = 98, + DUNGEON_ZERO_ISLE_NORTH = 99, + DUNGEON_ZERO_ISLE_EAST = 100, + DUNGEON_ZERO_ISLE_WEST = 101, + DUNGEON_ZERO_ISLE_SOUTH = 102, + DUNGEON_ZERO_ISLE_CENTER = 103, + DUNGEON_DESTINY_TOWER = 104, + DUNGEON_DUMMY_0x69 = 105, + DUNGEON_DUMMY_0x6A = 106, + DUNGEON_OBLIVION_FOREST = 107, + DUNGEON_TREACHEROUS_WATERS = 108, + DUNGEON_SOUTHEASTERN_ISLANDS = 109, + DUNGEON_INFERNO_CAVE = 110, + DUNGEON_1ST_STATION_PASS = 111, + DUNGEON_2ND_STATION_PASS = 112, + DUNGEON_3RD_STATION_PASS = 113, + DUNGEON_4TH_STATION_PASS = 114, + DUNGEON_5TH_STATION_PASS = 115, + DUNGEON_6TH_STATION_PASS = 116, + DUNGEON_7TH_STATION_PASS = 117, + DUNGEON_8TH_STATION_PASS = 118, + DUNGEON_9TH_STATION_PASS = 119, + DUNGEON_SKY_PEAK_SUMMIT_PASS = 120, + DUNGEON_5TH_STATION_CLEARING = 121, + DUNGEON_SKY_PEAK_SUMMIT = 122, + DUNGEON_STAR_CAVE_SE1 = 123, + DUNGEON_DEEP_STAR_CAVE = 124, + DUNGEON_DEEP_STAR_CAVE_TEAM_ROGUE = 125, + DUNGEON_STAR_CAVE_DEPTHS = 126, + DUNGEON_STAR_CAVE_PIT = 127, + DUNGEON_MURKY_FOREST = 128, + DUNGEON_EASTERN_CAVE = 129, + DUNGEON_FORTUNE_RAVINE = 130, + DUNGEON_FORTUNE_RAVINE_DEPTHS = 131, + DUNGEON_FORTUNE_RAVINE_PIT = 132, + DUNGEON_BARREN_VALLEY = 133, + DUNGEON_DEEP_BARREN_VALLEY = 134, + DUNGEON_BARREN_VALLEY_CLEARING = 135, + DUNGEON_DARK_WASTELAND = 136, + DUNGEON_TEMPORAL_TOWER_SE5 = 137, + DUNGEON_TEMPORAL_SPIRE_SE5 = 138, + DUNGEON_DUSK_FOREST_SE5 = 139, + DUNGEON_BLACK_SWAMP = 140, + DUNGEON_SPACIAL_CLIFFS = 141, + DUNGEON_DARK_ICE_MOUNTAIN = 142, + DUNGEON_DARK_ICE_MOUNTAIN_PEAK = 143, + DUNGEON_DARK_ICE_MOUNTAIN_PINNACLE = 144, + DUNGEON_ICICLE_FOREST = 145, + DUNGEON_VAST_ICE_MOUNTAIN = 146, + DUNGEON_VAST_ICE_MOUNTAIN_PEAK = 147, + DUNGEON_VAST_ICE_MOUNTAIN_PINNACLE = 148, + DUNGEON_SOUTHERN_JUNGLE = 149, + DUNGEON_BOULDER_QUARRY = 150, + DUNGEON_DEEP_BOULDER_QUARRY = 151, + DUNGEON_BOULDER_QUARRY_CLEARING = 152, + DUNGEON_RIGHT_CAVE_PATH = 153, + DUNGEON_LEFT_CAVE_PATH = 154, + DUNGEON_LIMESTONE_CAVERN = 155, + DUNGEON_DEEP_LIMESTONE_CAVERN = 156, + DUNGEON_LIMESTONE_CAVERN_DEPTHS = 157, + DUNGEON_SPRING_CAVE = 158, + DUNGEON_UPPER_SPRING_CAVE_HAUNTER = 159, + DUNGEON_UPPER_SPRING_CAVE = 160, + DUNGEON_MIDDLE_SPRING_CAVE = 161, + DUNGEON_LOWER_SPRING_CAVE = 162, + DUNGEON_SPRING_CAVE_DEPTHS = 163, + DUNGEON_SPRING_CAVE_PIT = 164, + DUNGEON_LITTLE_PLAINS = 165, + DUNGEON_MT_CLEAR = 166, + DUNGEON_CHALLENGE_RIVER = 167, + DUNGEON_TRIAL_FOREST = 168, + DUNGEON_GUIDING_SEA = 169, + DUNGEON_HIDDEN_SHOPKEEPER_VILLAGE = 170, + DUNGEON_DUMMY_0xAB = 171, + DUNGEON_DUMMY_0xAC = 172, + DUNGEON_DUMMY_0xAD = 173, + DUNGEON_STAR_CAVE = 174, + DUNGEON_SHAYMIN_VILLAGE = 175, + DUNGEON_ARMALDOS_SHELTER = 176, + DUNGEON_LUMINOUS_SPRING = 177, + DUNGEON_HOT_SPRING = 178, + DUNGEON_RESCUE = 179, + DUNGEON_NORMAL_FLY_MAZE = 180, + DUNGEON_DARK_FIRE_MAZE = 181, + DUNGEON_ROCK_WATER_MAZE = 182, + DUNGEON_GRASS_MAZE = 183, + DUNGEON_ELEC_STEEL_MAZE = 184, + DUNGEON_ICE_GROUND_MAZE = 185, + DUNGEON_FIGHT_PSYCH_MAZE = 186, + DUNGEON_POISON_BUG_MAZE = 187, + DUNGEON_DRAGON_MAZE = 188, + DUNGEON_GHOST_MAZE = 189, + DUNGEON_EXPLORER_MAZE = 190, + DUNGEON_FINAL_MAZE = 191, + DUNGEON_DOJO_0xC0 = 192, + DUNGEON_DOJO_0xC1 = 193, + DUNGEON_DOJO_0xC2 = 194, + DUNGEON_DOJO_0xC3 = 195, + DUNGEON_DOJO_0xC4 = 196, + DUNGEON_DOJO_0xC5 = 197, + DUNGEON_DOJO_0xC6 = 198, + DUNGEON_DOJO_0xC7 = 199, + DUNGEON_DOJO_0xC8 = 200, + DUNGEON_DOJO_0xC9 = 201, + DUNGEON_DOJO_0xCA = 202, + DUNGEON_DOJO_0xCB = 203, + DUNGEON_DOJO_0xCC = 204, + DUNGEON_DOJO_0xCD = 205, + DUNGEON_DOJO_0xCE = 206, + DUNGEON_DOJO_0xCF = 207, + DUNGEON_DOJO_0xD0 = 208, + DUNGEON_DOJO_0xD1 = 209, + DUNGEON_DOJO_0xD2 = 210, + DUNGEON_DOJO_0xD3 = 211, + DUNGEON_RESCUE_DUNGEON = 212, + DUNGEON_BASE = 213, + DUNGEON_JOINED_AT_QUESTION_MARKS = 214, // Joined at ??? + DUNGEON_BEACH = 215, + DUNGEON_JOINED_AT_UNKNOWN = 216, + DUNGEON_JOINED_AT_BIDOOF = 217, + DUNGEON_JOINED_AT_GROVYLE = 218, + DUNGEON_JOINED_AT_CELEBI = 219, + DUNGEON_JOINED_AT_CHATOT = 220, + DUNGEON_JOINED_AT_CRESSELIA = 221, // As a guest member during the story + DUNGEON_DUMMY_0xDE = 222, + DUNGEON_DUMMY_0xDF = 223, + DUNGEON_DUMMY_0xE0 = 224, + DUNGEON_DUMMY_0xE1 = 225, + DUNGEON_DUMMY_0xE2 = 226, + DUNGEON_DUMMY_0xE3 = 227, + DUNGEON_DUMMY_0xE4 = 228, + DUNGEON_DUMMY_0xE5 = 229, + DUNGEON_DUMMY_0xE6 = 230, + DUNGEON_DUMMY_0xE7 = 231, + DUNGEON_DUMMY_0xE8 = 232, + DUNGEON_DUMMY_0xE9 = 233, + DUNGEON_DUMMY_0xEA = 234, + DUNGEON_DUMMY_0xEB = 235, + DUNGEON_DUMMY_0xEC = 236, + DUNGEON_DUMMY_0xED = 237, + DUNGEON_DUMMY_0xEE = 238, + DUNGEON_DUMMY_0xEF = 239, + DUNGEON_DUMMY_0xF0 = 240, + DUNGEON_JOINED_AT_MANAPHY_RECRUITED = 241, // When recruited + DUNGEON_JOINED_AT_CRESSELIA_RECRUITED = 242, // When recruited + DUNGEON_JOINED_AT_SHAYMIN_LAND_RECRUITED = 243, // When recruited + DUNGEON_DUMMY_0xF4 = 244, + DUNGEON_DUMMY_0xF5 = 245, + DUNGEON_DUMMY_0xF6 = 246, + DUNGEON_TREASURE_TOWN_0xF7 = 247, + DUNGEON_TREASURE_TOWN_0xF8 = 248, + DUNGEON_OUTSIDE = 249, + DUNGEON_CLIENT = 250, + DUNGEON_DUMMY_0xFB = 251, + DUNGEON_DUMMY_0xFC = 252, + DUNGEON_DUMMY_0xFD = 253, + DUNGEON_DUMMY_0xFE = 254, + DUNGEON_DUMMY_0xFF = 255, +}; + +// Type IDx +enum type_id { + TYPE_NONE = 0, + TYPE_NORMAL = 1, + TYPE_FIRE = 2, + TYPE_WATER = 3, + TYPE_GRASS = 4, + TYPE_ELECTRIC = 5, + TYPE_ICE = 6, + TYPE_FIGHTING = 7, + TYPE_POISON = 8, + TYPE_GROUND = 9, + TYPE_FLYING = 10, + TYPE_PSYCHIC = 11, + TYPE_BUG = 12, + TYPE_ROCK = 13, + TYPE_GHOST = 14, + TYPE_DRAGON = 15, + TYPE_DARK = 16, + TYPE_STEEL = 17, + TYPE_NEUTRAL = 18, +}; + +// Modes related to shopkeeper behavior +enum shopkeeper_mode { + SHOPKEEPER_MODE_NORMAL = 0, + SHOPKEEPER_MODE_SHOPKEEPER = 1, + SHOPKEEPER_MODE_ATTACK_ENEMIES = 2, + SHOPKEEPER_MODE_ATTACK_TEAM = 3, +}; + +// Some macro shenanigans to define the monster secondary gender labels neatly. +#define _MONSTER_ID_GENDERED(name, base_value) \ + MONSTER_##name = base_value, MONSTER_##name##_SECONDARY = base_value + 600 + +// Monster ID. Add 600 to the base value to get secondary genders (typically female). +enum monster_id { + _MONSTER_ID_GENDERED(NONE, 0), + _MONSTER_ID_GENDERED(BULBASAUR, 1), + _MONSTER_ID_GENDERED(IVYSAUR, 2), + _MONSTER_ID_GENDERED(VENUSAUR, 3), + _MONSTER_ID_GENDERED(CHARMANDER, 4), + _MONSTER_ID_GENDERED(CHARMELEON, 5), + _MONSTER_ID_GENDERED(CHARIZARD, 6), + _MONSTER_ID_GENDERED(SQUIRTLE, 7), + _MONSTER_ID_GENDERED(WARTORTLE, 8), + _MONSTER_ID_GENDERED(BLASTOISE, 9), + _MONSTER_ID_GENDERED(CATERPIE, 10), + _MONSTER_ID_GENDERED(METAPOD, 11), + _MONSTER_ID_GENDERED(BUTTERFREE, 12), + _MONSTER_ID_GENDERED(WEEDLE, 13), + _MONSTER_ID_GENDERED(KAKUNA, 14), + _MONSTER_ID_GENDERED(BEEDRILL, 15), + _MONSTER_ID_GENDERED(PIDGEY, 16), + _MONSTER_ID_GENDERED(PIDGEOTTO, 17), + _MONSTER_ID_GENDERED(PIDGEOT, 18), + _MONSTER_ID_GENDERED(RATTATA, 19), + _MONSTER_ID_GENDERED(RATICATE, 20), + _MONSTER_ID_GENDERED(SPEAROW, 21), + _MONSTER_ID_GENDERED(FEAROW, 22), + _MONSTER_ID_GENDERED(EKANS, 23), + _MONSTER_ID_GENDERED(ARBOK, 24), + _MONSTER_ID_GENDERED(PIKACHU, 25), + _MONSTER_ID_GENDERED(RAICHU, 26), + _MONSTER_ID_GENDERED(SANDSHREW, 27), + _MONSTER_ID_GENDERED(SANDSLASH, 28), + _MONSTER_ID_GENDERED(NIDORAN_F, 29), + _MONSTER_ID_GENDERED(NIDORINA, 30), + _MONSTER_ID_GENDERED(NIDOQUEEN, 31), + _MONSTER_ID_GENDERED(NIDORAN_M, 32), + _MONSTER_ID_GENDERED(NIDORINO, 33), + _MONSTER_ID_GENDERED(NIDOKING, 34), + _MONSTER_ID_GENDERED(CLEFAIRY, 35), + _MONSTER_ID_GENDERED(CLEFABLE, 36), + _MONSTER_ID_GENDERED(VULPIX, 37), + _MONSTER_ID_GENDERED(NINETALES, 38), + _MONSTER_ID_GENDERED(JIGGLYPUFF, 39), + _MONSTER_ID_GENDERED(WIGGLYTUFF, 40), + _MONSTER_ID_GENDERED(ZUBAT, 41), + _MONSTER_ID_GENDERED(GOLBAT, 42), + _MONSTER_ID_GENDERED(ODDISH, 43), + _MONSTER_ID_GENDERED(GLOOM, 44), + _MONSTER_ID_GENDERED(VILEPLUME, 45), + _MONSTER_ID_GENDERED(PARAS, 46), + _MONSTER_ID_GENDERED(PARASECT, 47), + _MONSTER_ID_GENDERED(VENONAT, 48), + _MONSTER_ID_GENDERED(VENOMOTH, 49), + _MONSTER_ID_GENDERED(DIGLETT, 50), + _MONSTER_ID_GENDERED(DUGTRIO, 51), + _MONSTER_ID_GENDERED(MEOWTH, 52), + _MONSTER_ID_GENDERED(PERSIAN, 53), + _MONSTER_ID_GENDERED(PSYDUCK, 54), + _MONSTER_ID_GENDERED(GOLDUCK, 55), + _MONSTER_ID_GENDERED(MANKEY, 56), + _MONSTER_ID_GENDERED(PRIMEAPE, 57), + _MONSTER_ID_GENDERED(GROWLITHE, 58), + _MONSTER_ID_GENDERED(ARCANINE, 59), + _MONSTER_ID_GENDERED(POLIWAG, 60), + _MONSTER_ID_GENDERED(POLIWHIRL, 61), + _MONSTER_ID_GENDERED(POLIWRATH, 62), + _MONSTER_ID_GENDERED(ABRA, 63), + _MONSTER_ID_GENDERED(KADABRA, 64), + _MONSTER_ID_GENDERED(ALAKAZAM, 65), + _MONSTER_ID_GENDERED(MACHOP, 66), + _MONSTER_ID_GENDERED(MACHOKE, 67), + _MONSTER_ID_GENDERED(MACHAMP, 68), + _MONSTER_ID_GENDERED(BELLSPROUT, 69), + _MONSTER_ID_GENDERED(WEEPINBELL, 70), + _MONSTER_ID_GENDERED(VICTREEBEL, 71), + _MONSTER_ID_GENDERED(TENTACOOL, 72), + _MONSTER_ID_GENDERED(TENTACRUEL, 73), + _MONSTER_ID_GENDERED(GEODUDE, 74), + _MONSTER_ID_GENDERED(GRAVELER, 75), + _MONSTER_ID_GENDERED(GOLEM, 76), + _MONSTER_ID_GENDERED(PONYTA, 77), + _MONSTER_ID_GENDERED(RAPIDASH, 78), + _MONSTER_ID_GENDERED(SLOWPOKE, 79), + _MONSTER_ID_GENDERED(SLOWBRO, 80), + _MONSTER_ID_GENDERED(MAGNEMITE, 81), + _MONSTER_ID_GENDERED(MAGNETON, 82), + _MONSTER_ID_GENDERED(FARFETCHD, 83), + _MONSTER_ID_GENDERED(DODUO, 84), + _MONSTER_ID_GENDERED(DODRIO, 85), + _MONSTER_ID_GENDERED(SEEL, 86), + _MONSTER_ID_GENDERED(DEWGONG, 87), + _MONSTER_ID_GENDERED(GRIMER, 88), + _MONSTER_ID_GENDERED(MUK, 89), + _MONSTER_ID_GENDERED(SHELLDER, 90), + _MONSTER_ID_GENDERED(CLOYSTER, 91), + _MONSTER_ID_GENDERED(GASTLY, 92), + _MONSTER_ID_GENDERED(HAUNTER, 93), + _MONSTER_ID_GENDERED(GENGAR, 94), + _MONSTER_ID_GENDERED(ONIX, 95), + _MONSTER_ID_GENDERED(DROWZEE, 96), + _MONSTER_ID_GENDERED(HYPNO, 97), + _MONSTER_ID_GENDERED(KRABBY, 98), + _MONSTER_ID_GENDERED(KINGLER, 99), + _MONSTER_ID_GENDERED(VOLTORB, 100), + _MONSTER_ID_GENDERED(ELECTRODE, 101), + _MONSTER_ID_GENDERED(EXEGGCUTE, 102), + _MONSTER_ID_GENDERED(EXEGGUTOR, 103), + _MONSTER_ID_GENDERED(CUBONE, 104), + _MONSTER_ID_GENDERED(MAROWAK, 105), + _MONSTER_ID_GENDERED(HITMONLEE, 106), + _MONSTER_ID_GENDERED(HITMONCHAN, 107), + _MONSTER_ID_GENDERED(LICKITUNG, 108), + _MONSTER_ID_GENDERED(KOFFING, 109), + _MONSTER_ID_GENDERED(WEEZING, 110), + _MONSTER_ID_GENDERED(RHYHORN, 111), + _MONSTER_ID_GENDERED(RHYDON, 112), + _MONSTER_ID_GENDERED(CHANSEY, 113), + _MONSTER_ID_GENDERED(TANGELA, 114), + _MONSTER_ID_GENDERED(KANGASKHAN, 115), + _MONSTER_ID_GENDERED(HORSEA, 116), + _MONSTER_ID_GENDERED(SEADRA, 117), + _MONSTER_ID_GENDERED(GOLDEEN, 118), + _MONSTER_ID_GENDERED(SEAKING, 119), + _MONSTER_ID_GENDERED(STARYU, 120), + _MONSTER_ID_GENDERED(STARMIE, 121), + _MONSTER_ID_GENDERED(MR_MIME, 122), + _MONSTER_ID_GENDERED(SCYTHER, 123), + _MONSTER_ID_GENDERED(JYNX, 124), + _MONSTER_ID_GENDERED(ELECTABUZZ, 125), + _MONSTER_ID_GENDERED(MAGMAR, 126), + _MONSTER_ID_GENDERED(PINSIR, 127), + _MONSTER_ID_GENDERED(TAUROS, 128), + _MONSTER_ID_GENDERED(MAGIKARP, 129), + _MONSTER_ID_GENDERED(GYARADOS, 130), + _MONSTER_ID_GENDERED(LAPRAS, 131), + _MONSTER_ID_GENDERED(DITTO, 132), + _MONSTER_ID_GENDERED(EEVEE, 133), + _MONSTER_ID_GENDERED(VAPOREON, 134), + _MONSTER_ID_GENDERED(JOLTEON, 135), + _MONSTER_ID_GENDERED(FLAREON, 136), + _MONSTER_ID_GENDERED(PORYGON, 137), + _MONSTER_ID_GENDERED(OMANYTE, 138), + _MONSTER_ID_GENDERED(OMASTAR, 139), + _MONSTER_ID_GENDERED(KABUTO, 140), + _MONSTER_ID_GENDERED(KABUTOPS, 141), + _MONSTER_ID_GENDERED(AERODACTYL, 142), + _MONSTER_ID_GENDERED(SNORLAX, 143), + _MONSTER_ID_GENDERED(ARTICUNO, 144), + _MONSTER_ID_GENDERED(ZAPDOS, 145), + _MONSTER_ID_GENDERED(MOLTRES, 146), + _MONSTER_ID_GENDERED(DRATINI, 147), + _MONSTER_ID_GENDERED(DRAGONAIR, 148), + _MONSTER_ID_GENDERED(DRAGONITE, 149), + _MONSTER_ID_GENDERED(MEWTWO, 150), + _MONSTER_ID_GENDERED(MEW, 151), + _MONSTER_ID_GENDERED(CHIKORITA, 152), + _MONSTER_ID_GENDERED(BAYLEEF, 153), + _MONSTER_ID_GENDERED(MEGANIUM, 154), + _MONSTER_ID_GENDERED(CYNDAQUIL, 155), + _MONSTER_ID_GENDERED(QUILAVA, 156), + _MONSTER_ID_GENDERED(TYPHLOSION, 157), + _MONSTER_ID_GENDERED(TOTODILE, 158), + _MONSTER_ID_GENDERED(CROCONAW, 159), + _MONSTER_ID_GENDERED(FERALIGATR, 160), + _MONSTER_ID_GENDERED(SENTRET, 161), + _MONSTER_ID_GENDERED(FURRET, 162), + _MONSTER_ID_GENDERED(HOOTHOOT, 163), + _MONSTER_ID_GENDERED(NOCTOWL, 164), + _MONSTER_ID_GENDERED(LEDYBA, 165), + _MONSTER_ID_GENDERED(LEDIAN, 166), + _MONSTER_ID_GENDERED(SPINARAK, 167), + _MONSTER_ID_GENDERED(ARIADOS, 168), + _MONSTER_ID_GENDERED(CROBAT, 169), + _MONSTER_ID_GENDERED(CHINCHOU, 170), + _MONSTER_ID_GENDERED(LANTURN, 171), + _MONSTER_ID_GENDERED(PICHU, 172), + _MONSTER_ID_GENDERED(CLEFFA, 173), + _MONSTER_ID_GENDERED(IGGLYBUFF, 174), + _MONSTER_ID_GENDERED(TOGEPI, 175), + _MONSTER_ID_GENDERED(TOGETIC, 176), + _MONSTER_ID_GENDERED(NATU, 177), + _MONSTER_ID_GENDERED(XATU, 178), + _MONSTER_ID_GENDERED(MAREEP, 179), + _MONSTER_ID_GENDERED(FLAAFFY, 180), + _MONSTER_ID_GENDERED(AMPHAROS, 181), + _MONSTER_ID_GENDERED(BELLOSSOM, 182), + _MONSTER_ID_GENDERED(MARILL, 183), + _MONSTER_ID_GENDERED(AZUMARILL, 184), + _MONSTER_ID_GENDERED(SUDOWOODO, 185), + _MONSTER_ID_GENDERED(POLITOED, 186), + _MONSTER_ID_GENDERED(HOPPIP, 187), + _MONSTER_ID_GENDERED(SKIPLOOM, 188), + _MONSTER_ID_GENDERED(JUMPLUFF, 189), + _MONSTER_ID_GENDERED(AIPOM, 190), + _MONSTER_ID_GENDERED(SUNKERN, 191), + _MONSTER_ID_GENDERED(SUNFLORA, 192), + _MONSTER_ID_GENDERED(YANMA, 193), + _MONSTER_ID_GENDERED(WOOPER, 194), + _MONSTER_ID_GENDERED(QUAGSIRE, 195), + _MONSTER_ID_GENDERED(ESPEON, 196), + _MONSTER_ID_GENDERED(UMBREON, 197), + _MONSTER_ID_GENDERED(MURKROW, 198), + _MONSTER_ID_GENDERED(SLOWKING, 199), + _MONSTER_ID_GENDERED(MISDREAVUS, 200), + _MONSTER_ID_GENDERED(UNOWN_A, 201), + _MONSTER_ID_GENDERED(UNOWN_B, 202), + _MONSTER_ID_GENDERED(UNOWN_C, 203), + _MONSTER_ID_GENDERED(UNOWN_D, 204), + _MONSTER_ID_GENDERED(UNOWN_E, 205), + _MONSTER_ID_GENDERED(UNOWN_F, 206), + _MONSTER_ID_GENDERED(UNOWN_G, 207), + _MONSTER_ID_GENDERED(UNOWN_H, 208), + _MONSTER_ID_GENDERED(UNOWN_I, 209), + _MONSTER_ID_GENDERED(UNOWN_J, 210), + _MONSTER_ID_GENDERED(UNOWN_K, 211), + _MONSTER_ID_GENDERED(UNOWN_L, 212), + _MONSTER_ID_GENDERED(UNOWN_M, 213), + _MONSTER_ID_GENDERED(UNOWN_N, 214), + _MONSTER_ID_GENDERED(UNOWN_O, 215), + _MONSTER_ID_GENDERED(UNOWN_P, 216), + _MONSTER_ID_GENDERED(UNOWN_Q, 217), + _MONSTER_ID_GENDERED(UNOWN_R, 218), + _MONSTER_ID_GENDERED(UNOWN_S, 219), + _MONSTER_ID_GENDERED(UNOWN_T, 220), + _MONSTER_ID_GENDERED(UNOWN_U, 221), + _MONSTER_ID_GENDERED(UNOWN_V, 222), + _MONSTER_ID_GENDERED(UNOWN_W, 223), + _MONSTER_ID_GENDERED(UNOWN_X, 224), + _MONSTER_ID_GENDERED(UNOWN_Y, 225), + _MONSTER_ID_GENDERED(UNOWN_Z, 226), + _MONSTER_ID_GENDERED(UNOWN_EXCLAMATION, 227), + _MONSTER_ID_GENDERED(UNOWN_QUESTION, 228), + _MONSTER_ID_GENDERED(WOBBUFFET, 229), + _MONSTER_ID_GENDERED(GIRAFARIG, 230), + _MONSTER_ID_GENDERED(PINECO, 231), + _MONSTER_ID_GENDERED(FORRETRESS, 232), + _MONSTER_ID_GENDERED(DUNSPARCE, 233), + _MONSTER_ID_GENDERED(GLIGAR, 234), + _MONSTER_ID_GENDERED(STEELIX, 235), + _MONSTER_ID_GENDERED(SNUBBULL, 236), + _MONSTER_ID_GENDERED(GRANBULL, 237), + _MONSTER_ID_GENDERED(QWILFISH, 238), + _MONSTER_ID_GENDERED(SCIZOR, 239), + _MONSTER_ID_GENDERED(SHUCKLE, 240), + _MONSTER_ID_GENDERED(HERACROSS, 241), + _MONSTER_ID_GENDERED(SNEASEL, 242), + _MONSTER_ID_GENDERED(TEDDIURSA, 243), + _MONSTER_ID_GENDERED(URSARING, 244), + _MONSTER_ID_GENDERED(SLUGMA, 245), + _MONSTER_ID_GENDERED(MAGCARGO, 246), + _MONSTER_ID_GENDERED(SWINUB, 247), + _MONSTER_ID_GENDERED(PILOSWINE, 248), + _MONSTER_ID_GENDERED(CORSOLA, 249), + _MONSTER_ID_GENDERED(REMORAID, 250), + _MONSTER_ID_GENDERED(OCTILLERY, 251), + _MONSTER_ID_GENDERED(DELIBIRD, 252), + _MONSTER_ID_GENDERED(MANTINE, 253), + _MONSTER_ID_GENDERED(SKARMORY, 254), + _MONSTER_ID_GENDERED(HOUNDOUR, 255), + _MONSTER_ID_GENDERED(HOUNDOOM, 256), + _MONSTER_ID_GENDERED(KINGDRA, 257), + _MONSTER_ID_GENDERED(PHANPY, 258), + _MONSTER_ID_GENDERED(DONPHAN, 259), + _MONSTER_ID_GENDERED(PORYGON2, 260), + _MONSTER_ID_GENDERED(STANTLER, 261), + _MONSTER_ID_GENDERED(SMEARGLE, 262), + _MONSTER_ID_GENDERED(TYROGUE, 263), + _MONSTER_ID_GENDERED(HITMONTOP, 264), + _MONSTER_ID_GENDERED(SMOOCHUM, 265), + _MONSTER_ID_GENDERED(ELEKID, 266), + _MONSTER_ID_GENDERED(MAGBY, 267), + _MONSTER_ID_GENDERED(MILTANK, 268), + _MONSTER_ID_GENDERED(BLISSEY, 269), + _MONSTER_ID_GENDERED(RAIKOU, 270), + _MONSTER_ID_GENDERED(ENTEI, 271), + _MONSTER_ID_GENDERED(SUICUNE, 272), + _MONSTER_ID_GENDERED(LARVITAR, 273), + _MONSTER_ID_GENDERED(PUPITAR, 274), + _MONSTER_ID_GENDERED(TYRANITAR, 275), + _MONSTER_ID_GENDERED(LUGIA, 276), + _MONSTER_ID_GENDERED(HO_OH, 277), + _MONSTER_ID_GENDERED(CELEBI, 278), + _MONSTER_ID_GENDERED(SHINY_CELEBI, 279), + _MONSTER_ID_GENDERED(TREECKO, 280), + _MONSTER_ID_GENDERED(GROVYLE, 281), + _MONSTER_ID_GENDERED(SCEPTILE, 282), + _MONSTER_ID_GENDERED(TORCHIC, 283), + _MONSTER_ID_GENDERED(COMBUSKEN, 284), + _MONSTER_ID_GENDERED(BLAZIKEN, 285), + _MONSTER_ID_GENDERED(MUDKIP, 286), + _MONSTER_ID_GENDERED(MARSHTOMP, 287), + _MONSTER_ID_GENDERED(SWAMPERT, 288), + _MONSTER_ID_GENDERED(POOCHYENA, 289), + _MONSTER_ID_GENDERED(MIGHTYENA, 290), + _MONSTER_ID_GENDERED(ZIGZAGOON, 291), + _MONSTER_ID_GENDERED(LINOONE, 292), + _MONSTER_ID_GENDERED(WURMPLE, 293), + _MONSTER_ID_GENDERED(SILCOON, 294), + _MONSTER_ID_GENDERED(BEAUTIFLY, 295), + _MONSTER_ID_GENDERED(CASCOON, 296), + _MONSTER_ID_GENDERED(DUSTOX, 297), + _MONSTER_ID_GENDERED(LOTAD, 298), + _MONSTER_ID_GENDERED(LOMBRE, 299), + _MONSTER_ID_GENDERED(LUDICOLO, 300), + _MONSTER_ID_GENDERED(SEEDOT, 301), + _MONSTER_ID_GENDERED(NUZLEAF, 302), + _MONSTER_ID_GENDERED(SHIFTRY, 303), + _MONSTER_ID_GENDERED(TAILLOW, 304), + _MONSTER_ID_GENDERED(SWELLOW, 305), + _MONSTER_ID_GENDERED(WINGULL, 306), + _MONSTER_ID_GENDERED(PELIPPER, 307), + _MONSTER_ID_GENDERED(RALTS, 308), + _MONSTER_ID_GENDERED(KIRLIA, 309), + _MONSTER_ID_GENDERED(GARDEVOIR, 310), + _MONSTER_ID_GENDERED(SURSKIT, 311), + _MONSTER_ID_GENDERED(MASQUERAIN, 312), + _MONSTER_ID_GENDERED(SHROOMISH, 313), + _MONSTER_ID_GENDERED(BRELOOM, 314), + _MONSTER_ID_GENDERED(SLAKOTH, 315), + _MONSTER_ID_GENDERED(VIGOROTH, 316), + _MONSTER_ID_GENDERED(SLAKING, 317), + _MONSTER_ID_GENDERED(NINCADA, 318), + _MONSTER_ID_GENDERED(NINJASK, 319), + _MONSTER_ID_GENDERED(SHEDINJA, 320), + _MONSTER_ID_GENDERED(WHISMUR, 321), + _MONSTER_ID_GENDERED(LOUDRED, 322), + _MONSTER_ID_GENDERED(EXPLOUD, 323), + _MONSTER_ID_GENDERED(MAKUHITA, 324), + _MONSTER_ID_GENDERED(HARIYAMA, 325), + _MONSTER_ID_GENDERED(AZURILL, 326), + _MONSTER_ID_GENDERED(NOSEPASS, 327), + _MONSTER_ID_GENDERED(SKITTY, 328), + _MONSTER_ID_GENDERED(DELCATTY, 329), + _MONSTER_ID_GENDERED(SABLEYE, 330), + _MONSTER_ID_GENDERED(MAWILE, 331), + _MONSTER_ID_GENDERED(ARON, 332), + _MONSTER_ID_GENDERED(LAIRON, 333), + _MONSTER_ID_GENDERED(AGGRON, 334), + _MONSTER_ID_GENDERED(MEDITITE, 335), + _MONSTER_ID_GENDERED(MEDICHAM, 336), + _MONSTER_ID_GENDERED(ELECTRIKE, 337), + _MONSTER_ID_GENDERED(MANECTRIC, 338), + _MONSTER_ID_GENDERED(PLUSLE, 339), + _MONSTER_ID_GENDERED(MINUN, 340), + _MONSTER_ID_GENDERED(VOLBEAT, 341), + _MONSTER_ID_GENDERED(ILLUMISE, 342), + _MONSTER_ID_GENDERED(ROSELIA, 343), + _MONSTER_ID_GENDERED(GULPIN, 344), + _MONSTER_ID_GENDERED(SWALOT, 345), + _MONSTER_ID_GENDERED(CARVANHA, 346), + _MONSTER_ID_GENDERED(SHARPEDO, 347), + _MONSTER_ID_GENDERED(WAILMER, 348), + _MONSTER_ID_GENDERED(WAILORD, 349), + _MONSTER_ID_GENDERED(NUMEL, 350), + _MONSTER_ID_GENDERED(CAMERUPT, 351), + _MONSTER_ID_GENDERED(TORKOAL, 352), + _MONSTER_ID_GENDERED(SPOINK, 353), + _MONSTER_ID_GENDERED(GRUMPIG, 354), + _MONSTER_ID_GENDERED(SPINDA, 355), + _MONSTER_ID_GENDERED(TRAPINCH, 356), + _MONSTER_ID_GENDERED(VIBRAVA, 357), + _MONSTER_ID_GENDERED(FLYGON, 358), + _MONSTER_ID_GENDERED(CACNEA, 359), + _MONSTER_ID_GENDERED(CACTURNE, 360), + _MONSTER_ID_GENDERED(SWABLU, 361), + _MONSTER_ID_GENDERED(ALTARIA, 362), + _MONSTER_ID_GENDERED(ZANGOOSE, 363), + _MONSTER_ID_GENDERED(SEVIPER, 364), + _MONSTER_ID_GENDERED(LUNATONE, 365), + _MONSTER_ID_GENDERED(SOLROCK, 366), + _MONSTER_ID_GENDERED(BARBOACH, 367), + _MONSTER_ID_GENDERED(WHISCASH, 368), + _MONSTER_ID_GENDERED(CORPHISH, 369), + _MONSTER_ID_GENDERED(CRAWDAUNT, 370), + _MONSTER_ID_GENDERED(BALTOY, 371), + _MONSTER_ID_GENDERED(CLAYDOL, 372), + _MONSTER_ID_GENDERED(LILEEP, 373), + _MONSTER_ID_GENDERED(CRADILY, 374), + _MONSTER_ID_GENDERED(ANORITH, 375), + _MONSTER_ID_GENDERED(ARMALDO, 376), + _MONSTER_ID_GENDERED(FEEBAS, 377), + _MONSTER_ID_GENDERED(MILOTIC, 378), + _MONSTER_ID_GENDERED(CASTFORM_NORMAL, 379), + _MONSTER_ID_GENDERED(CASTFORM_SNOWY, 380), + _MONSTER_ID_GENDERED(CASTFORM_SUNNY, 381), + _MONSTER_ID_GENDERED(CASTFORM_RAINY, 382), + _MONSTER_ID_GENDERED(KECLEON, 383), + _MONSTER_ID_GENDERED(PURPLE_KECLEON, 384), + _MONSTER_ID_GENDERED(SHUPPET, 385), + _MONSTER_ID_GENDERED(BANETTE, 386), + _MONSTER_ID_GENDERED(DUSKULL, 387), + _MONSTER_ID_GENDERED(DUSCLOPS, 388), + _MONSTER_ID_GENDERED(TROPIUS, 389), + _MONSTER_ID_GENDERED(CHIMECHO, 390), + _MONSTER_ID_GENDERED(ABSOL, 391), + _MONSTER_ID_GENDERED(WYNAUT, 392), + _MONSTER_ID_GENDERED(SNORUNT, 393), + _MONSTER_ID_GENDERED(GLALIE, 394), + _MONSTER_ID_GENDERED(SPHEAL, 395), + _MONSTER_ID_GENDERED(SEALEO, 396), + _MONSTER_ID_GENDERED(WALREIN, 397), + _MONSTER_ID_GENDERED(CLAMPERL, 398), + _MONSTER_ID_GENDERED(HUNTAIL, 399), + _MONSTER_ID_GENDERED(GOREBYSS, 400), + _MONSTER_ID_GENDERED(RELICANTH, 401), + _MONSTER_ID_GENDERED(LUVDISC, 402), + _MONSTER_ID_GENDERED(BAGON, 403), + _MONSTER_ID_GENDERED(SHELGON, 404), + _MONSTER_ID_GENDERED(SALAMENCE, 405), + _MONSTER_ID_GENDERED(BELDUM, 406), + _MONSTER_ID_GENDERED(METANG, 407), + _MONSTER_ID_GENDERED(METAGROSS, 408), + _MONSTER_ID_GENDERED(REGIROCK, 409), + _MONSTER_ID_GENDERED(REGICE, 410), + _MONSTER_ID_GENDERED(REGISTEEL, 411), + _MONSTER_ID_GENDERED(LATIAS, 412), + _MONSTER_ID_GENDERED(LATIOS, 413), + _MONSTER_ID_GENDERED(KYOGRE, 414), + _MONSTER_ID_GENDERED(GROUDON, 415), + _MONSTER_ID_GENDERED(RAYQUAZA, 416), + _MONSTER_ID_GENDERED(JIRACHI, 417), + _MONSTER_ID_GENDERED(DEOXYS_NORMAL, 418), + _MONSTER_ID_GENDERED(DEOXYS_ATTACK, 419), + _MONSTER_ID_GENDERED(DEOXYS_DEFENSE, 420), + _MONSTER_ID_GENDERED(DEOXYS_SPEED, 421), + _MONSTER_ID_GENDERED(TURTWIG, 422), + _MONSTER_ID_GENDERED(GROTLE, 423), + _MONSTER_ID_GENDERED(TORTERRA, 424), + _MONSTER_ID_GENDERED(CHIMCHAR, 425), + _MONSTER_ID_GENDERED(MONFERNO, 426), + _MONSTER_ID_GENDERED(INFERNAPE, 427), + _MONSTER_ID_GENDERED(PIPLUP, 428), + _MONSTER_ID_GENDERED(PRINPLUP, 429), + _MONSTER_ID_GENDERED(EMPOLEON, 430), + _MONSTER_ID_GENDERED(STARLY, 431), + _MONSTER_ID_GENDERED(STARAVIA, 432), + _MONSTER_ID_GENDERED(STARAPTOR, 433), + _MONSTER_ID_GENDERED(BIDOOF, 434), + _MONSTER_ID_GENDERED(BIBAREL, 435), + _MONSTER_ID_GENDERED(KRICKETOT, 436), + _MONSTER_ID_GENDERED(KRICKETUNE, 437), + _MONSTER_ID_GENDERED(SHINX, 438), + _MONSTER_ID_GENDERED(LUXIO, 439), + _MONSTER_ID_GENDERED(LUXRAY, 440), + _MONSTER_ID_GENDERED(BUDEW, 441), + _MONSTER_ID_GENDERED(ROSERADE, 442), + _MONSTER_ID_GENDERED(CRANIDOS, 443), + _MONSTER_ID_GENDERED(RAMPARDOS, 444), + _MONSTER_ID_GENDERED(SHIELDON, 445), + _MONSTER_ID_GENDERED(BASTIODON, 446), + _MONSTER_ID_GENDERED(BURMY_SANDY, 447), + _MONSTER_ID_GENDERED(BURMY_PLANT, 448), + _MONSTER_ID_GENDERED(BURMY_TRASH, 449), + _MONSTER_ID_GENDERED(WORMADAM_SANDY, 450), + _MONSTER_ID_GENDERED(WORMADAM_PLANT, 451), + _MONSTER_ID_GENDERED(WORMADAM_TRASH, 452), + _MONSTER_ID_GENDERED(MOTHIM, 453), + _MONSTER_ID_GENDERED(COMBEE, 454), + _MONSTER_ID_GENDERED(VESPIQUEN, 455), + _MONSTER_ID_GENDERED(PACHIRISU, 456), + _MONSTER_ID_GENDERED(BUIZEL, 457), + _MONSTER_ID_GENDERED(FLOATZEL, 458), + _MONSTER_ID_GENDERED(CHERUBI, 459), + _MONSTER_ID_GENDERED(CHERRIM_OVERCAST, 460), + _MONSTER_ID_GENDERED(CHERRIM_SUNSHINE, 461), + _MONSTER_ID_GENDERED(SHELLOS_EAST, 462), + _MONSTER_ID_GENDERED(SHELLOS_WEST, 463), + _MONSTER_ID_GENDERED(GASTRODON_EAST, 464), + _MONSTER_ID_GENDERED(GASTRODON_WEST, 465), + _MONSTER_ID_GENDERED(AMBIPOM, 466), + _MONSTER_ID_GENDERED(DRIFLOON, 467), + _MONSTER_ID_GENDERED(DRIFBLIM, 468), + _MONSTER_ID_GENDERED(BUNEARY, 469), + _MONSTER_ID_GENDERED(LOPUNNY, 470), + _MONSTER_ID_GENDERED(MISMAGIUS, 471), + _MONSTER_ID_GENDERED(HONCHKROW, 472), + _MONSTER_ID_GENDERED(GLAMEOW, 473), + _MONSTER_ID_GENDERED(PURUGLY, 474), + _MONSTER_ID_GENDERED(CHINGLING, 475), + _MONSTER_ID_GENDERED(STUNKY, 476), + _MONSTER_ID_GENDERED(SKUNTANK, 477), + _MONSTER_ID_GENDERED(BRONZOR, 478), + _MONSTER_ID_GENDERED(BRONZONG, 479), + _MONSTER_ID_GENDERED(BONSLY, 480), + _MONSTER_ID_GENDERED(MIME_JR, 481), + _MONSTER_ID_GENDERED(HAPPINY, 482), + _MONSTER_ID_GENDERED(CHATOT, 483), + _MONSTER_ID_GENDERED(SPIRITOMB, 484), + _MONSTER_ID_GENDERED(GIBLE, 485), + _MONSTER_ID_GENDERED(GABITE, 486), + _MONSTER_ID_GENDERED(GARCHOMP, 487), + _MONSTER_ID_GENDERED(MUNCHLAX, 488), + _MONSTER_ID_GENDERED(RIOLU, 489), + _MONSTER_ID_GENDERED(LUCARIO, 490), + _MONSTER_ID_GENDERED(HIPPOPOTAS, 491), + _MONSTER_ID_GENDERED(HIPPOWDON, 492), + _MONSTER_ID_GENDERED(SKORUPI, 493), + _MONSTER_ID_GENDERED(DRAPION, 494), + _MONSTER_ID_GENDERED(CROAGUNK, 495), + _MONSTER_ID_GENDERED(TOXICROAK, 496), + _MONSTER_ID_GENDERED(CARNIVINE, 497), + _MONSTER_ID_GENDERED(FINNEON, 498), + _MONSTER_ID_GENDERED(LUMINEON, 499), + _MONSTER_ID_GENDERED(MANTYKE, 500), + _MONSTER_ID_GENDERED(SNOVER, 501), + _MONSTER_ID_GENDERED(ABOMASNOW, 502), + _MONSTER_ID_GENDERED(WEAVILE, 503), + _MONSTER_ID_GENDERED(MAGNEZONE, 504), + _MONSTER_ID_GENDERED(LICKILICKY, 505), + _MONSTER_ID_GENDERED(RHYPERIOR, 506), + _MONSTER_ID_GENDERED(TANGROWTH, 507), + _MONSTER_ID_GENDERED(ELECTIVIRE, 508), + _MONSTER_ID_GENDERED(MAGMORTAR, 509), + _MONSTER_ID_GENDERED(TOGEKISS, 510), + _MONSTER_ID_GENDERED(YANMEGA, 511), + _MONSTER_ID_GENDERED(LEAFEON, 512), + _MONSTER_ID_GENDERED(GLACEON, 513), + _MONSTER_ID_GENDERED(GLISCOR, 514), + _MONSTER_ID_GENDERED(MAMOSWINE, 515), + _MONSTER_ID_GENDERED(PORYGON_Z, 516), + _MONSTER_ID_GENDERED(GALLADE, 517), + _MONSTER_ID_GENDERED(PROBOPASS, 518), + _MONSTER_ID_GENDERED(DUSKNOIR, 519), + _MONSTER_ID_GENDERED(FROSLASS, 520), + _MONSTER_ID_GENDERED(ROTOM, 521), + _MONSTER_ID_GENDERED(UXIE, 522), + _MONSTER_ID_GENDERED(MESPRIT, 523), + _MONSTER_ID_GENDERED(AZELF, 524), + _MONSTER_ID_GENDERED(DIALGA, 525), + _MONSTER_ID_GENDERED(PALKIA, 526), + _MONSTER_ID_GENDERED(HEATRAN, 527), + _MONSTER_ID_GENDERED(REGIGIGAS, 528), + _MONSTER_ID_GENDERED(GIRATINA_ALTERED, 529), + _MONSTER_ID_GENDERED(CRESSELIA, 530), + _MONSTER_ID_GENDERED(PHIONE, 531), + _MONSTER_ID_GENDERED(MANAPHY, 532), + _MONSTER_ID_GENDERED(DARKRAI, 533), + _MONSTER_ID_GENDERED(SHAYMIN_LAND, 534), + _MONSTER_ID_GENDERED(SHAYMIN_SKY, 535), + _MONSTER_ID_GENDERED(GIRATINA_ORIGIN, 536), + _MONSTER_ID_GENDERED(UNNAMED_0x219, 537), + _MONSTER_ID_GENDERED(UNNAMED_0x21A, 538), + _MONSTER_ID_GENDERED(UNNAMED_0x21B, 539), + _MONSTER_ID_GENDERED(UNNAMED_0x21C, 540), + _MONSTER_ID_GENDERED(UNNAMED_0x21D, 541), + _MONSTER_ID_GENDERED(UNNAMED_0x21E, 542), + _MONSTER_ID_GENDERED(UNNAMED_0x21F, 543), + _MONSTER_ID_GENDERED(UNNAMED_0x220, 544), + _MONSTER_ID_GENDERED(UNNAMED_0x221, 545), + _MONSTER_ID_GENDERED(UNNAMED_0x222, 546), + _MONSTER_ID_GENDERED(UNNAMED_0x223, 547), + _MONSTER_ID_GENDERED(UNNAMED_0x224, 548), + _MONSTER_ID_GENDERED(UNNAMED_0x225, 549), + _MONSTER_ID_GENDERED(UNNAMED_0x226, 550), + _MONSTER_ID_GENDERED(UNNAMED_0x227, 551), + _MONSTER_ID_GENDERED(PRIMAL_DIALGA, 552), + _MONSTER_ID_GENDERED(DECOY, 553), + _MONSTER_ID_GENDERED(STATUE, 554), + MONSTER_WIGGLYTUFF_STORY = 555, + MONSTER_REGIGIGAS_STORY = 556, + MONSTER_BRONZONG_STORY = 557, + MONSTER_HITMONLEE_STORY = 558, + MONSTER_CHIMECHO_STORY = 559, + MONSTER_WIGGLYTUFF_STORY_2 = 560, + MONSTER_UXIE_STORY = 561, + MONSTER_AZELF_STORY = 562, + MONSTER_MESPRIT_STORY = 563, + MONSTER_SUNFLORA_STORY = 564, + MONSTER_DIGLETT_STORY = 565, + MONSTER_DUGTRIO_STORY = 566, + MONSTER_CORPHISH_STORY = 567, + MONSTER_LOUDRED_STORY = 568, + MONSTER_BIDOOF_STORY = 569, + MONSTER_CHATOT_STORY = 570, + MONSTER_GROVYLE_STORY = 571, + MONSTER_DUSKNOIR_STORY = 572, + MONSTER_SABLEYE_STORY = 573, + MONSTER_DARKRAI_STORY = 574, + MONSTER_MAMA = 575, + MONSTER_GROVYLE_STORY_2 = 576, + MONSTER_DUSKNOIR_STORY_2 = 577, + MONSTER_DUSKNOIR_STORY_3 = 578, + MONSTER_SENTRET_DITTO = 579, + MONSTER_BELLOSSOM_DITTO = 580, + MONSTER_RESERVE_27 = 581, + MONSTER_RESERVE_28 = 582, + MONSTER_RESERVE_29 = 583, + MONSTER_RESERVE_30 = 584, + MONSTER_RESERVE_31 = 585, + MONSTER_RESERVE_32 = 586, + MONSTER_RESERVE_33 = 587, + MONSTER_RESERVE_34 = 588, + MONSTER_RESERVE_35 = 589, + MONSTER_RESERVE_36 = 590, + MONSTER_RESERVE_37 = 591, + MONSTER_RESERVE_38 = 592, + MONSTER_RESERVE_39 = 593, + MONSTER_RESERVE_40 = 594, + MONSTER_RESERVE_41 = 595, + MONSTER_RESERVE_42 = 596, + MONSTER_RESERVE_43 = 597, + MONSTER_RESERVE_44 = 598, + MONSTER_RESERVE_45 = 599, +}; +#undef _MONSTER_ID_GENDERED + +// Actions that a monster can take on its turn +enum action { + ACTION_NOTHING = 0, // 0x0 + // 0x1: Pass turn. Enemies will print the "is watching carefully" message when performing this + // action + ACTION_PASS_TURN = 1, + ACTION_WALK = 2, // 0x2: Walk + ACTION_UNK_3 = 3, + ACTION_UNK_4 = 4, + ACTION_UNK_5 = 5, + ACTION_NEXT = 6, // 0x6: Switch to next Pokémon when viewing moves + ACTION_PREVIOUS = 7, // 0x7: Switch to previous Pokémon when viewing moves + ACTION_PLACE_ITEM = 8, // 0x8: Place an item on the floor + ACTION_PICK_UP_PLAYER = 9, // 0x9: Pick up an item from the floor (player) + ACTION_UNK_A = 10, + ACTION_THROW_ITEM_PLAYER = 11, // 0xB: Throw an item + ACTION_CHECK_ITEM_DESCRIPTION = 12, // 0xC: Check the description of an item + ACTION_EAT_BERRY_SEED_DRINK = 13, // 0xD: Each a berry or seed, or drink something + ACTION_EAT_GUMMI = 14, // 0xE: Eat a gummi + ACTION_UNK_F = 15, + ACTION_USE_TM = 16, // 0x10: Use a TM + ACTION_UNK_11 = 17, + ACTION_USE_ITEM = 18, // 0x12: Use an item + ACTION_TALK_FIELD = 19, // 0x13: Talk to a teammate by facing them and pressing A + ACTION_USE_MOVE_PLAYER = 20, // 0x14: Use a move (player) + ACTION_USE_MOVE_AI = 21, // 0x15: Use a move (AI) + ACTION_UNK_16 = 22, + ACTION_STRUGGLE = 23, // 0x17: Use Struggle + ACTION_UNK_18 = 24, + ACTION_CHECK_MOVES = 25, // 0x19: Check the list of moves + ACTION_CHANGE_TACTICS = 26, // 0x1A: Change a teammate's tactic + ACTION_CHECK_SUMMARY = 27, // 0x1B: Check a pokémon's summary + ACTION_TALK_MENU = 28, // 0x1C: Talk to a teammate by using the in-menu option + ACTION_UNK_1D = 29, + ACTION_SET_MOVE = 30, // 0x1E: Set a move + ACTION_SWITCH_MOVE = 31, // 0x1F: Switch a move on or off + ACTION_UNK_20 = 32, + ACTION_UNK_21 = 33, + ACTION_UNK_22 = 34, + ACTION_EAT_AI = 35, // 0x23: Eat item (AI) + ACTION_THROW_ITEM_AI = 36, // 0x24: Throw an item (AI) + ACTION_UNK_25 = 37, + ACTION_USE_STAIRS = 38, // 0x26: Use the stairs + ACTION_THROW_STRAIGHT_PLAYER = 39, // 0x27: Throw a straight-line item (player) + ACTION_UNK_28 = 40, + ACTION_UNK_29 = 41, + ACTION_UNK_2A = 42, + ACTION_QUICKSAVE = 43, // 0x2B: Quicksave + ACTION_USE_LINK_BOX = 44, // 0x2C: Use a Link Box + ACTION_UNK_2D = 45, + ACTION_GIVE_UP = 46, // 0x2E: Give up + ACTION_UNK_2F = 47, + ACTION_VIEW_IQ = 48, // 0x30: Open the IQ skills menu + ACTION_USE_ORB = 49, // 0x31: Use an orb + ACTION_REGULAR_ATTACK = 50, // 0x32: Regular Attack + ACTION_UNSET_MOVE = 51, // 0x33: Unset a move + ACTION_SEND_HOME = 52, // 0x34: Send a pokémon home + ACTION_UNK_35 = 53, + ACTION_GIVE_ITEM = 54, // 0X36: Give held item + ACTION_TAKE_ITEM = 35, // 0x37: Take a held item + ACTION_UNK_38 = 36, + // 0x39: had second thoughts! - Used as a failsafe when trying to take an illegal + // action + ACTION_SECOND_THOUGHTS = 37, + ACTION_SWAP_ITEM = 38, // 0x3A: Swapping an item + ACTION_CHANGE_LEADER = 39, // 0x3B: Change the team's leader + ACTION_SET_ITEM = 40, // 0x3C: Set item + ACTION_UNSET_ITEM = 41, // 0x3D: Unset item + ACTION_UNK_3E = 42, + ACTION_PICK_UP_AI = 43, // 0x3F: Pick up an item (AI) + ACTION_UNK_40 = 44, + ACTION_THROW_ARC_PLAYER = 45, // 0x41: Throw a Gravelerock or a similar item (player) + ACTION_PAD = 0xffff, // To force the enum on 16 bits +}; + +// Behavior type of NPC monsters +enum monster_behavior { + BEHAVIOR_NORMAL_ENEMY_0x0 = 0, + BEHAVIOR_OUTLAW = 1, + BEHAVIOR_HIDDEN_OUTLAW = 2, + BEHAVIOR_FLEEING_OUTLAW = 3, + BEHAVIOR_OUTLAW_TEAM_LEADER = 4, + BEHAVIOR_OUTLAW_TEAM_MINION = 5, + BEHAVIOR_FIXED_ENEMY = 6, + BEHAVIOR_RESCUE_TARGET = 7, + BEHAVIOR_WANDERING_ENEMY_0x8 = 8, + BEHAVIOR_NORMAL_ENEMY_0x9 = 9, + BEHAVIOR_ALLY = 10, + BEHAVIOR_EXPLORER_MAZE_1 = 11, + BEHAVIOR_EXPLORER_MAZE_2 = 12, + BEHAVIOR_EXPLORER_MAZE_3 = 13, + BEHAVIOR_EXPLORER_MAZE_4 = 14, + BEHAVIOR_INVALID = 15, + BEHAVIOR_SECRET_BAZAAR_KIRLIA = 16, + BEHAVIOR_SECRET_BAZAAR_MIME_JR = 17, + BEHAVIOR_SECRET_BAZAAR_SWALOT = 18, + BEHAVIOR_SECRET_BAZAAR_LICKILICKY = 19, + BEHAVIOR_SECRETE_BAZAAR_SHEDINJA = 20, + BEHAVIOR_WANDERING_ENEMY_0x15 = 21, +}; + +// Music/song IDs. Some background SFX are also stored as "songs". +enum music_id { + MUSIC_NONE_0x0 = 0, + MUSIC_POKEMON_EXPLORATION_TEAM_THEME = 1, + MUSIC_TOP_MENU_THEME = 2, + MUSIC_MAROWAK_DOJO = 3, + MUSIC_THE_GATEKEEPERS = 4, + MUSIC_JOB_CLEAR = 5, + MUSIC_WELCOME_TO_THE_WORLD_OF_POKEMON = 6, + MUSIC_WIGGLYTUFFS_GUILD = 7, + MUSIC_WIGGLYTUFFS_GUILD_REMIX = 8, + MUSIC_TREASURE_TOWN = 9, + MUSIC_DO_YOUR_BEST_AS_ALWAYS = 10, + MUSIC_MONSTER_HOUSE = 11, + MUSIC_KECLEONS_SHOP = 12, + MUSIC_OUTLAW = 13, + MUSIC_IN_THE_DEPTHS_OF_THE_PIT = 14, + MUSIC_BOSS_BATTLE = 15, + MUSIC_DIALGAS_FIGHT_TO_THE_FINISH = 16, + MUSIC_BATTLE_AGAINST_DUSKNOIR = 17, + MUSIC_DEFY_THE_LEGENDS = 18, + MUSIC_MISSION_FAILURE = 19, + MUSIC_MISSION_SUCCESS = 20, + MUSIC_BEACH_CAVE = 21, + MUSIC_DRENCHED_BLUFF = 22, + MUSIC_MT_BRISTLE = 23, + MUSIC_WATERFALL_CAVE = 24, + MUSIC_APPLE_WOODS = 25, + MUSIC_CRAGGY_COAST = 26, + MUSIC_CAVE_AND_SIDE_PATH = 27, + MUSIC_MT_HORN = 28, + MUSIC_FOGGY_FOREST = 29, + MUSIC_STEAM_CAVE = 30, + MUSIC_UPPER_STEAM_CAVE = 31, + MUSIC_AMP_PLAINS = 32, + MUSIC_FAR_AMP_PLAINS = 33, + MUSIC_NORTHERN_DESERT = 34, + MUSIC_QUICKSAND_CAVE = 35, + MUSIC_QUICKSAND_PIT = 36, + MUSIC_CRYSTAL_CAVE = 37, + MUSIC_CRYSTAL_CROSSING = 38, + MUSIC_CHASM_CAVE = 39, + MUSIC_DARK_HILL = 40, + MUSIC_SEALED_RUIN = 41, + MUSIC_DEEP_SEALED_RUIN = 42, + MUSIC_DUSK_FOREST = 43, + MUSIC_DEEP_DUSK_FOREST = 44, + MUSIC_RANDOM_DUNGEON_THEME_2 = 45, + MUSIC_BRINE_CAVE = 46, + MUSIC_LOWER_BRINE_CAVE = 47, + MUSIC_HIDDEN_LAND = 48, + MUSIC_HIDDEN_HIGHLAND = 49, + MUSIC_TEMPORAL_TOWER = 50, + MUSIC_TEMPORAL_SPIRE = 51, + MUSIC_MYSTIFYING_FOREST = 52, + MUSIC_BLIZZARD_ISLAND_RESCUE_TEAM_MEDLEY = 53, + MUSIC_SURROUNDED_SEA = 54, + MUSIC_RANDOM_DUNGEON_THEME_1 = 55, + MUSIC_AEGIS_CAVE = 56, + MUSIC_CONCEALED_RUINS = 57, + MUSIC_MT_TRAVAIL = 58, + MUSIC_IN_THE_NIGHTMARE = 59, + MUSIC_MIRACLE_SEA = 60, + MUSIC_TREESHROUD_FOREST = 61, + MUSIC_DARK_CRATER = 62, + MUSIC_DEEP_DARK_CRATER = 63, + MUSIC_INTRO_ALTERNATE_UNUSED = 64, + MUSIC_PERFECT_SENTRY_DUTY = 65, + MUSIC_GOOD_SENTRY_DUTY = 66, + MUSIC_DECENT_SENTRY_DUTY = 67, + MUSIC_FAILED_SENTRY_DUTY = 68, + MUSIC_ON_THE_BEACH_AT_DUSK = 69, + MUSIC_GOODNIGHT = 70, + MUSIC_GOODNIGHT_ALTERNATE_UNUSED = 71, + MUSIC_AT_THE_END_OF_THE_DAY = 72, + MUSIC_GUILDMASTER_WIGGLYTUFF = 73, + MUSIC_GROWING_ANXIETY = 74, + MUSIC_THE_POWER_OF_DARKNESS = 75, + MUSIC_OH_NO = 76, + MUSIC_TIME_GEAR = 77, + MUSIC_TIME_GEAR_REMIX = 78, + MUSIC_I_SAW_SOMETHING_AGAIN = 79, + MUSIC_IN_THE_FUTURE = 80, + MUSIC_PLANETS_PARALYSIS = 81, + MUSIC_THROUGH_THE_SEA_OF_TIME = 82, + MUSIC_IN_THE_HANDS_OF_FATE = 83, + MUSIC_TIME_RESTORED = 84, + MUSIC_DONT_EVER_FORGET = 85, + MUSIC_A_WISH_FOR_PEACE = 86, + MUSIC_ON_THE_BEACH_AT_DUSK_INTRO_ONLY = 87, + MUSIC_MEMORIES_RETURNED = 88, + MUSIC_ENDING_THEME_INTRO = 89, + MUSIC_ENDING_THEME = 90, + MUSIC_EPILOGUE_THEME = 91, + MUSIC_TITLE_THEME_ALTERNATE_1_UNUSED = 92, + MUSIC_TITLE_THEME_ALTERNATE_2_UNUSED = 93, + MUSIC_MURKY_FOREST = 94, + MUSIC_SKY_PEAK_CAVE = 95, + MUSIC_SOUTHERN_JUNGLE = 96, + MUSIC_SKY_PEAK_COAST = 97, + MUSIC_SPRING_CAVE = 98, + MUSIC_LOWER_SPRING_CAVE = 99, + MUSIC_OCEAN_SFX = 100, + MUSIC_THUNDERSTORM_SFX = 101, + MUSIC_THUNDERSTORM_MUFFLED_SFX = 102, + MUSIC_RUMBLING_SFX = 103, + MUSIC_RUMBLING_LOUDER_SFX = 104, + MUSIC_RUMBLING_LOUDEST_SFX = 105, + MUSIC_RUNNING_HOT_WATER_SFX = 106, + MUSIC_TEMPORAL_PINNACLE_SFX = 107, + MUSIC_TEMPORAL_PINNACLE = 108, + MUSIC_NULL_0x6D = 109, + MUSIC_HEAVY_FOOTSTEPS_SFX = 110, + MUSIC_SINGLE_TONE_RINGING_SFX = 111, + MUSIC_ELECTRICITY_SFX_1 = 112, + MUSIC_ELECTRICITY_SFX_2 = 113, + MUSIC_ELECTRICITY_SFX_3 = 114, + MUSIC_FIRE_CRACKLING_SFX_1 = 115, + MUSIC_FIRE_CRACKLING_SFX_2 = 116, + MUSIC_RELIC_FRAGMENT_SFX = 117, + MUSIC_RAINBOW_STONESHIP_SFX = 118, + MUSIC_RAINBOW_STONESHIP_PREPARING_SFX = 119, + MUSIC_HUMMING_SFX = 120, + MUSIC_HAVE_TO_GET_HOME = 121, + MUSIC_FARTHER_AWAY = 122, + MUSIC_PALKIAS_ONSLAUGHT = 123, + MUSIC_NONE_0x7C = 124, + MUSIC_WATERFALL_SFX = 125, + MUSIC_EATING_SFX = 126, + MUSIC_OMINOUS_STRING_NOTE_SFX = 127, + MUSIC_FLOOD_SFX = 128, + MUSIC_PELIPPER_ISLAND = 129, + MUSIC_TITLE_THEME = 130, + MUSIC_HEARTWARMING = 131, + MUSIC_DOWN_A_DARK_PATH = 132, + MUSIC_RISING_FEAR = 133, + MUSIC_TEAM_SKULL = 134, + MUSIC_SYMPATHY = 135, + MUSIC_BEYOND_THE_DREAM = 136, + MUSIC_AIR_OF_UNEASE = 137, + MUSIC_ONE_FOR_ALL = 138, + MUSIC__ALL_FOR_ONE = 139, + MUSIC_BOULDER_QUARRY = 140, + MUSIC_SPRING_CAVE_DEPTHS = 141, + MUSIC_STAR_CAVE = 142, + MUSIC_DEEP_STAR_CAVE = 143, + MUSIC_LIMESTONE_CAVE = 144, + MUSIC_DEEP_LIMESTONE_CAVE = 145, + MUSIC_RANDOM_DUNGEON_THEME_3 = 146, + MUSIC_FORTUNE_RAVINE = 147, + MUSIC_FORTUNE_RAVINE_DEPTHS = 148, + MUSIC_BARREN_VALLEY = 149, + MUSIC_DARK_WASTELAND = 150, + MUSIC_SPACIAL_CLIFFS = 151, + MUSIC_DARK_ICE_MOUNTAIN = 152, + MUSIC_ICICLE_FOREST = 153, + MUSIC_VAST_ICE_MOUNTAIN = 154, + MUSIC_VAST_ICE_MOUNTAIN_PEAK = 155, + MUSIC_SKY_PEAK_FOREST = 156, + MUSIC_SKY_PEAK_PRAIRIE = 157, + MUSIC_SKY_PEAK_SNOWFIELD = 158, + MUSIC_SKY_PEAK_FINAL_PASS = 159, + MUSIC_SPINDAS_CAFE = 160, + MUSIC_LUDICOLO_DANCE = 161, + MUSIC_ILLUSION_STONE_CHAMBER = 162, + MUSIC_IT_CANT_BE = 163, + MUSIC_DEFEND_GLOBE = 164, + MUSIC_DEFEND_GLOBE_ENDING = 165, + MUSIC_TEAM_CHARMS_THEME = 166, + MUSIC_HERE_COMES_TEAM_CHARM = 167, + MUSIC_FOR_A_NEW_LIFE = 168, + MUSIC_LIVING_SPIRIT = 169, + MUSIC_PROUD_ACCOMPLISHMENT = 170, + MUSIC_IN_THE_MORNING_SUN = 171, + MUSIC_A_NEW_WORLD = 172, + MUSIC_THOUGHTS_FOR_FRIENDS = 173, + MUSIC_LIFE_GOES_ON_ENDING = 174, + MUSIC_ITS_NOT_A_MIRACLE = 175, + MUSIC_A_MESSAGE_ON_THE_WIND = 176, + MUSIC_A_FUN_EXPLORATION = 177, + MUSIC_SHAYMIN_VILLAGE = 178, + MUSIC_TEAM_CHARMS_THEME_INTRO_ONLY = 179, + MUSIC_RUMBLING_SFX_4 = 180, + MUSIC_RUMBLING_SFX_5 = 181, + MUSIC_OCEAN_MUFFLED_SFX = 182, + MUSIC_WIND_SFX_1 = 183, + MUSIC_LIMESTONE_CAVERN_DEPTHS_SFX = 184, + MUSIC_FIRE_CRACKLING_SFX_3 = 185, + MUSIC_SKY_PEAK_8TH_STATION_CLEARING_SFX = 186, + MUSIC_WIND_AND_RAIN_SFX = 187, + MUSIC_VAST_ICE_MOUNTAIN_PINNACLE_SFX = 188, + MUSIC_SPRING_CAVE_SFX = 189, + MUSIC_WIND_SFX_2 = 190, + MUSIC_SOUTHERN_JUNGLE_EXIT_SFX = 191, + MUSIC_BOULDER_QUARRY_CLEARING_SFX = 192, + MUSIC_WATERFALL_CAVE_VISION_SFX = 193, + MUSIC_WIND_SFX_3 = 194, + MUSIC_NULL_0xC2 = 195, + MUSIC_NULL_0xC3 = 196, + MUSIC_NULL_0xC4 = 197, + MUSIC_NULL_0xC5 = 198, + MUSIC_NULL_0xC6 = 199, + MUSIC_TEAM_CHARMS_THEME_ALTERNATE_1_UNUSED = 200, + MUSIC_TEAM_CHARM_JINGLE = 201, + MUSIC_TEAM_CHARMS_THEME_ALTERNATE_2_UNUSED = 202, + MUSIC_NONE_0x3E7 = 999, +}; + +// Status IDs +// While there seems to be a global status order, this enum isn't used exactly that way in +// practice. See the comments for struct status. +enum status_id { + STATUS_NONE = 0, // Called "-" internally + STATUS_SLEEP = 1, + STATUS_SLEEPLESS = 2, // Won't get sleepy + STATUS_NIGHTMARE = 3, // Caught in a nightmare + STATUS_YAWNING = 4, + STATUS_NAPPING = 5, + STATUS_LOW_HP = 6, // Low HP! Situation critical! + STATUS_BURN = 7, // Burned + STATUS_POISONED = 8, + STATUS_BADLY_POISONED = 9, + STATUS_PARALYSIS = 10, // Paralyzed + STATUS_IDENTIFYING = 11, + STATUS_FROZEN = 12, + STATUS_SHADOW_HOLD = 13, // Immobilized + STATUS_WRAP = 14, // Wrapped around foe + STATUS_WRAPPED = 15, // Wrapped by foe + STATUS_INGRAIN = 16, // Using Ingrain + STATUS_PETRIFIED = 17, + STATUS_CONSTRICTION = 18, // Being squeezed + STATUS_FAMISHED = 19, // About to drop from hunger + STATUS_CRINGE = 20, // Cringing + STATUS_CONFUSED = 21, + STATUS_PAUSED = 22, // Pausing + STATUS_COWERING = 23, + STATUS_TAUNTED = 24, + STATUS_ENCORE = 25, // Afflicted with Encore + STATUS_INFATUATED = 26, + STATUS_DOUBLE_SPEED = 27, // Sped up + STATUS_BIDE = 28, // Biding + STATUS_SOLARBEAM = 29, // Charging SolarBeam + STATUS_SKY_ATTACK = 30, // Charging Sky Attack + STATUS_RAZOR_WIND = 31, // Charging Razor Wind + STATUS_FOCUS_PUNCH = 32, // Charging Focus Punch + STATUS_SKULL_BASH = 33, // Charging Skull Bash + STATUS_FLYING = 34, // Flying high up + STATUS_BOUNCING = 35, + STATUS_DIVING = 36, // Hiding underwater + STATUS_DIGGING = 37, // Burrowing underground + STATUS_CHARGING = 38, // Using Charge + STATUS_ENRAGED = 39, // Shaking with rage + STATUS_SHADOW_FORCE = 40, // Hiding among shadows + STATUS_HALF_SPEED = 41, // Slowed down + STATUS_REFLECT = 42, // Protected by Reflect + STATUS_SAFEGUARD = 43, // Protected by Safeguard + STATUS_LIGHT_SCREEN = 44, // Protected by Light Screen + STATUS_COUNTER = 45, // Ready to counter + STATUS_MAGIC_COAT = 46, // Protected by Magic Coat + STATUS_WISH = 47, // Making a wish + STATUS_PROTECT = 48, // Protecting itself + STATUS_MIRROR_COAT = 49, // Protected by Mirror Coat + STATUS_ENDURING = 50, // Set to endure + STATUS_MINI_COUNTER = 51, // Ready to deliver mini counters + STATUS_MIRROR_MOVE = 52, // Using Mirror Move + STATUS_CONVERSION2 = 53, // Alt Using Conversion 2 + STATUS_VITAL_THROW = 54, // Ready to use Vital Throw + STATUS_MIST = 55, // Protected by Mist + STATUS_METAL_BURST = 56, // Protected by Metal Burst + STATUS_AQUA_RING = 57, // Cloaked by Aqua Ring + STATUS_LUCKY_CHANT = 58, // Lucky Chant in effect + STATUS_WEAKENED = 59, + STATUS_CURSED = 60, + STATUS_DECOY = 61, + STATUS_SNATCH = 62, // Ready to snatch moves + STATUS_GASTRO_ACID = 63, // Drenched with Gastro Acid + STATUS_HEAL_BLOCK = 64, // Prevented from healing + STATUS_EMBARGO = 65, // Under Embargo + STATUS_HUNGRY_PAL = 66, // Immobilized by hunger + STATUS_LEECH_SEED = 67, // Afflicted with Leech Seed + STATUS_DESTINY_BOND = 68, // Using Destiny Bond + STATUS_POWERED_UP = 69, + STATUS_SURE_SHOT = 70, // Total accuracy for moves + STATUS_WHIFFER = 71, // Afflicted with Smokescreen + STATUS_SET_DAMAGE = 72, // Inflicts set damage + STATUS_FOCUS_ENERGY = 73, // Enhanced critical-hit rate + STATUS_UNNAMED_0x4A = 74, // Called "-" internally + STATUS_LONG_TOSS = 75, // Throws thrown items far + STATUS_PIERCE = 76, // Pierces walls w/ thrown items + STATUS_UNNAMED_0x4D = 77, + STATUS_INVISIBLE = 78, + STATUS_TRANSFORMED = 79, // Transformed Pokemon + STATUS_MOBILE = 80, // Travel anywhere + STATUS_SLIP = 81, // Walk on water + STATUS_UNNAMED_0x52 = 82, + STATUS_BLINKER = 83, // Blinded + STATUS_CROSS_EYED = 84, // Hallucinating + STATUS_EYEDROPS = 85, // Seeing the unseeable + STATUS_DROPEYE = 86, // Poor vision + STATUS_UNNAMED_0x57 = 87, + STATUS_MUZZLED = 88, // Unable to use its mouth + STATUS_UNNAMED_0x59 = 89, + STATUS_MIRACLE_EYE = 90, // Exposed by Miracle Eye + STATUS_UNNAMED_0x5B = 91, + STATUS_MAGNET_RISE = 92, // Levitating with Magnet Rise + STATUS_STOCKPILING = 93, + STATUS_POWER_EARS = 94, // Can locate other Pokemon + STATUS_SCANNING = 95, // Can locate items + STATUS_GRUDGE = 96, // Bearing a grudge + STATUS_EXPOSED = 97, // Exposed to sight + STATUS_TERRIFIED = 98, + STATUS_PERISH_SONG = 99, // Received Perish Song + STATUS_DOUBLED_ATTACK = 100, // Has sped-up attacks + STATUS_STAIR_SPOTTER = 101, // Can locate stairs +}; + + + +#endif //PMDSKY_ENUMS_H diff --git a/include/overlay_3102382820.h b/include/overlay_3102382820.h index 8407b103..97ebe59a 100644 --- a/include/overlay_3102382820.h +++ b/include/overlay_3102382820.h @@ -5,6 +5,7 @@ #include "util.h" #include "preprocessString.h" #include "dungeon_mode.h" +#include "dungeon.h" struct Window { u8 PAD[6]; @@ -43,20 +44,47 @@ struct struct_2 { }; struct struct_3 { + s8 e[4]; // 0x0 + u32 f; // 0x4 + struct entity* a; // 0x8 + u32 b; // 0xC + u32 c; // 0x10 + u32 d; // 0x14 +}; + +struct struct_5 { u32 field_0x0; u32 field_0x4; - u32* a; // 0x8 - u32 b; // 0xC - u32 c; // 0x10 - u32 d; // 0x14 + u8 PAD1[172]; + struct struct_6* a; // 0xB4 +}; + +struct struct_6 { + u8 PAD[74]; + u16 a; // 0x4A + u16 field_0x4c; + u8 b; // 0x4E + u8 field_0x4f; + u16 c; // 0x50 + u16 d; // 0x52 + u8 e; // 0x54 + u8 field_0x55; + u16 f; // 0x56 + u16 g; // 0x58 +}; + +struct struct_4 { + u8* str; + struct struct_3* st3; }; #define OV31_02382B54_CONST_1 (0x00000233) + u32 ov31_02382B54(void); void ov31_02382DAC(void); struct struct_1* ov31_02382E08(void); -void ov31_02382E18(u32* arg_1, u32 arg_2); -void ov31_02382ED4(u32* arg_1); +void ov31_02382E18(struct entity* arg_1, u32 arg_2); +void ov31_02382ED4(struct entity* arg_1); void ov31_02382F68(struct Window* window); diff --git a/include/util.h b/include/util.h index b6b38f0d..404e77e5 100644 --- a/include/util.h +++ b/include/util.h @@ -1,6 +1,13 @@ #ifndef PMDSKY_UTIL_H #define PMDSKY_UTIL_H +typedef s32 fx32_8; // 32-bit signed fixed-point number with 8 fraction bits +typedef u32 ufx32_8; // 32-bit unsigned fixed-point number with 8 fraction bits +typedef u8 undefined; +typedef u16 undefined2; +typedef u32 undefined4; +typedef u8 bool; + // RGBA8 structure. Sometimes alpha is ignored and only used for padding struct rgba { u8 r; diff --git a/src/overlay_3102382820.c b/src/overlay_3102382820.c index bb484c5c..e96316ad 100644 --- a/src/overlay_3102382820.c +++ b/src/overlay_3102382820.c @@ -11,7 +11,7 @@ extern struct struct_1 DUNGEON_WINDOW_PARAMS_3; extern u32 DUNGEON_WINDOW_PARAMS_4; extern u32 DUNGEON_MAIN_MENU_ITEMS; -extern struct {u8* str; struct struct_3* st3;} ov31_0238A2A0; +extern struct struct_4 ov31_0238A2A0; extern struct struct_1 OVERLAY31_UNKNOWN_STRUCT__NA_2389E30; @@ -61,7 +61,7 @@ extern u32 ov29_022F0B9C(void); extern void ov29_022E0C2C(u32); extern u32 GetFloorType(void); -extern u32 ov29_02338708(u32*); +extern u32 ov29_02338708(struct position*); void EntryOverlay31(void) { struct struct_1* r0; @@ -81,14 +81,15 @@ void DrawDungeonMenuStatusWindow(struct Window* window) u8 str_buff[DRAW_DUNGEON_MENU_STATUS_WINDOW_BUFF_SIZE]; u8 member_name_buffer[256]; struct entity* leader; - struct leader_info* leader_info; + struct monster* leader_info; u8* str; s32 line_offset; u8 is_valid_member; s32 i; leader = GetLeader(); - leader_info = (struct leader_info*)leader->info; + leader_info = (struct monster*)leader->info; + //str_values.dungeon_0 = leader_info->roost; str_values.digits_0 = CeilFixedPoint(leader_info->belly); str_values.digits_1 = CeilFixedPoint(leader_info->max_belly); @@ -121,13 +122,14 @@ void DrawDungeonMenuStatusWindow(struct Window* window) is_valid_member = (party_member->type != ENTITY_NOTHING); } if (is_valid_member) { - struct party_member_info* member_info = party_member->info; + struct monster* member_info = party_member->info; ov29_022E2A78(member_name_buffer, party_member, 0); str_values.string0 = member_name_buffer; - str_values.value_0 = member_info->hp_left; + str_values.value_0 = member_info->hp; - str_values.value_1 = MIN(member_info->hp_max_1 + member_info->hp_max_2, DRAW_DUNGEON_MENU_STATUS_WINDOW_CONST_2); + str_values.value_1 = MIN(member_info->max_hp_stat + member_info->max_hp_boost, + DRAW_DUNGEON_MENU_STATUS_WINDOW_CONST_2); str = StringFromId(DRAW_DUNGEON_MENU_STATUS_WINDOW_STR_ID_5); PreprocessString(str_buff, DRAW_DUNGEON_MENU_STATUS_WINDOW_BUFF_SIZE, str, 0, &str_values); @@ -247,7 +249,7 @@ struct struct_1* ov31_02382E08(void) return OVERLAY31_UNKNOWN_POINTER__NA_238A260[1]; } -void ov31_02382E18(u32* arg_1, u32 arg_2) +void ov31_02382E18(struct entity* arg_1, u32 arg_2) { ov29_022EA428(6, 0); AdvanceFrame(0x62); @@ -270,7 +272,7 @@ void ov31_02382E18(u32* arg_1, u32 arg_2) ov29_022E0C2C(1); } -void ov31_02382ED4(u32* arg_1) +void ov31_02382ED4(struct entity* arg_1) { struct struct_3* tmp1; if (sub_020348E4(&OVERLAY31_UNKNOWN_STRUCT__NA_2389E30) == 0) @@ -278,7 +280,7 @@ void ov31_02382ED4(u32* arg_1) tmp1 = MemAlloc(sizeof(struct struct_3), 8); ov31_0238A2A0.st3 = tmp1; - ov31_0238A2A0.st3->field_0x4 = 0; + ov31_0238A2A0.st3->f = 0; ov31_0238A2A0.st3->a = arg_1; ov31_0238A2A0.st3->b = 0; ov31_0238A2A0.st3->c = 0; @@ -289,7 +291,7 @@ void ov31_02382ED4(u32* arg_1) r4 = 2; } else if (floor_type == 1) { r4 = 1; - } else if (ov29_02338708(arg_1+1)) { + } else if (ov29_02338708(&(arg_1->pos))) { r4 = 3; } diff --git a/tools/m2ctx/m2ctx.sh b/tools/m2ctx/m2ctx.sh index ad99eec5..9feeaa28 100755 --- a/tools/m2ctx/m2ctx.sh +++ b/tools/m2ctx/m2ctx.sh @@ -4,7 +4,7 @@ OUT_FILE=ctx.c GCC=gcc FLAGS="-E -P -dD -undef" -INCLUDES="-Iinclude -Iinclude/library -Ifiles -Ilib/include -include global.h" +INCLUDES="-Iinclude -Iinclude/library -Ifiles -Ilib/include" # -include global.h" DEFINES="-DGAME_REMASTER=0 -DNORTH_AMERICA -DPM_KEEP_ASSERTS -DSDK_ARM9 -DSDK_CODE_ARM -DSDK_FINALROM"