From 3d36173ed68cf0e0934b4f19244eeba345a5dbae Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Sun, 16 Jun 2024 21:05:09 -0400 Subject: [PATCH] Use a union/bit fields impl for events --- pokemonred_puffer/data/events.py | 2582 +++++++++++++++++++++++++ pokemonred_puffer/environment.py | 43 +- pokemonred_puffer/rewards/baseline.py | 75 +- 3 files changed, 2655 insertions(+), 45 deletions(-) diff --git a/pokemonred_puffer/data/events.py b/pokemonred_puffer/data/events.py index c7db94a..c21468c 100644 --- a/pokemonred_puffer/data/events.py +++ b/pokemonred_puffer/data/events.py @@ -1,3 +1,2585 @@ +from ctypes import c_uint8, LittleEndianStructure, Union + +from pyboy import PyBoy + EVENT_FLAGS_START = 0xD747 EVENTS_FLAGS_LENGTH = 320 MUSEUM_TICKET = (0xD754, 0) + + +class Flags_bits(LittleEndianStructure): + _fields_ = [ + ("EVENT_FOLLOWED_OAK_INTO_LAB", c_uint8, 1), + ("EVENT_001", c_uint8, 1), + ("EVENT_002", c_uint8, 1), + ("EVENT_HALL_OF_FAME_DEX_RATING", c_uint8, 1), + ("EVENT_004", c_uint8, 1), + ("EVENT_005", c_uint8, 1), + ("EVENT_PALLET_AFTER_GETTING_POKEBALLS", c_uint8, 1), + ("EVENT_007", c_uint8, 1), + ("EVENT_008", c_uint8, 1), + ("EVENT_009", c_uint8, 1), + ("EVENT_00A", c_uint8, 1), + ("EVENT_00B", c_uint8, 1), + ("EVENT_00C", c_uint8, 1), + ("EVENT_00D", c_uint8, 1), + ("EVENT_00E", c_uint8, 1), + ("EVENT_00F", c_uint8, 1), + ("EVENT_010", c_uint8, 1), + ("EVENT_011", c_uint8, 1), + ("EVENT_012", c_uint8, 1), + ("EVENT_013", c_uint8, 1), + ("EVENT_014", c_uint8, 1), + ("EVENT_015", c_uint8, 1), + ("EVENT_016", c_uint8, 1), + ("EVENT_017", c_uint8, 1), + ("EVENT_GOT_TOWN_MAP", c_uint8, 1), + ("EVENT_ENTERED_BLUES_HOUSE", c_uint8, 1), + ("EVENT_DAISY_WALKING", c_uint8, 1), + ("EVENT_01B", c_uint8, 1), + ("EVENT_01C", c_uint8, 1), + ("EVENT_01D", c_uint8, 1), + ("EVENT_01E", c_uint8, 1), + ("EVENT_01F", c_uint8, 1), + ("EVENT_FOLLOWED_OAK_INTO_LAB_2", c_uint8, 1), + ("EVENT_OAK_ASKED_TO_CHOOSE_MON", c_uint8, 1), + ("EVENT_GOT_STARTER", c_uint8, 1), + ("EVENT_BATTLED_RIVAL_IN_OAKS_LAB", c_uint8, 1), + ("EVENT_GOT_POKEBALLS_FROM_OAK", c_uint8, 1), + ("EVENT_GOT_POKEDEX", c_uint8, 1), + ("EVENT_PALLET_AFTER_GETTING_POKEBALLS_2", c_uint8, 1), + ("EVENT_OAK_APPEARED_IN_PALLET", c_uint8, 1), + ("EVENT_VIRIDIAN_GYM_OPEN", c_uint8, 1), + ("EVENT_GOT_TM42", c_uint8, 1), + ("EVENT_02A", c_uint8, 1), + ("EVENT_02B", c_uint8, 1), + ("EVENT_02C", c_uint8, 1), + ("EVENT_02D", c_uint8, 1), + ("EVENT_02E", c_uint8, 1), + ("EVENT_02F", c_uint8, 1), + ("EVENT_030", c_uint8, 1), + ("EVENT_031", c_uint8, 1), + ("EVENT_032", c_uint8, 1), + ("EVENT_033", c_uint8, 1), + ("EVENT_034", c_uint8, 1), + ("EVENT_035", c_uint8, 1), + ("EVENT_036", c_uint8, 1), + ("EVENT_037", c_uint8, 1), + ("EVENT_OAK_GOT_PARCEL", c_uint8, 1), + ("EVENT_GOT_OAKS_PARCEL", c_uint8, 1), + ("EVENT_03A", c_uint8, 1), + ("EVENT_03B", c_uint8, 1), + ("EVENT_03C", c_uint8, 1), + ("EVENT_03D", c_uint8, 1), + ("EVENT_03E", c_uint8, 1), + ("EVENT_03F", c_uint8, 1), + ("EVENT_040", c_uint8, 1), + ("EVENT_041", c_uint8, 1), + ("EVENT_042", c_uint8, 1), + ("EVENT_043", c_uint8, 1), + ("EVENT_044", c_uint8, 1), + ("EVENT_045", c_uint8, 1), + ("EVENT_046", c_uint8, 1), + ("EVENT_047", c_uint8, 1), + ("EVENT_048", c_uint8, 1), + ("EVENT_049", c_uint8, 1), + ("EVENT_04A", c_uint8, 1), + ("EVENT_04B", c_uint8, 1), + ("EVENT_04C", c_uint8, 1), + ("EVENT_04D", c_uint8, 1), + ("EVENT_04E", c_uint8, 1), + ("EVENT_04F", c_uint8, 1), + ("EVENT_GOT_TM27", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7", c_uint8, 1), + ("EVENT_05A", c_uint8, 1), + ("EVENT_05B", c_uint8, 1), + ("EVENT_05C", c_uint8, 1), + ("EVENT_05D", c_uint8, 1), + ("EVENT_05E", c_uint8, 1), + ("EVENT_05F", c_uint8, 1), + ("EVENT_060", c_uint8, 1), + ("EVENT_061", c_uint8, 1), + ("EVENT_062", c_uint8, 1), + ("EVENT_063", c_uint8, 1), + ("EVENT_064", c_uint8, 1), + ("EVENT_065", c_uint8, 1), + ("EVENT_066", c_uint8, 1), + ("EVENT_067", c_uint8, 1), + ("EVENT_BOUGHT_MUSEUM_TICKET", c_uint8, 1), + ("EVENT_GOT_OLD_AMBER", c_uint8, 1), + ("EVENT_06A", c_uint8, 1), + ("EVENT_06B", c_uint8, 1), + ("EVENT_06C", c_uint8, 1), + ("EVENT_06D", c_uint8, 1), + ("EVENT_06E", c_uint8, 1), + ("EVENT_06F", c_uint8, 1), + ("EVENT_070", c_uint8, 1), + ("EVENT_071", c_uint8, 1), + ("EVENT_BEAT_PEWTER_GYM_TRAINER_0", c_uint8, 1), + ("EVENT_073", c_uint8, 1), + ("EVENT_074", c_uint8, 1), + ("EVENT_075", c_uint8, 1), + ("EVENT_GOT_TM34", c_uint8, 1), + ("EVENT_BEAT_BROCK", c_uint8, 1), + ("EVENT_078", c_uint8, 1), + ("EVENT_079", c_uint8, 1), + ("EVENT_07A", c_uint8, 1), + ("EVENT_07B", c_uint8, 1), + ("EVENT_07C", c_uint8, 1), + ("EVENT_07D", c_uint8, 1), + ("EVENT_07E", c_uint8, 1), + ("EVENT_07F", c_uint8, 1), + ("EVENT_080", c_uint8, 1), + ("EVENT_081", c_uint8, 1), + ("EVENT_082", c_uint8, 1), + ("EVENT_083", c_uint8, 1), + ("EVENT_084", c_uint8, 1), + ("EVENT_085", c_uint8, 1), + ("EVENT_086", c_uint8, 1), + ("EVENT_087", c_uint8, 1), + ("EVENT_088", c_uint8, 1), + ("EVENT_089", c_uint8, 1), + ("EVENT_08A", c_uint8, 1), + ("EVENT_08B", c_uint8, 1), + ("EVENT_08C", c_uint8, 1), + ("EVENT_08D", c_uint8, 1), + ("EVENT_08E", c_uint8, 1), + ("EVENT_08F", c_uint8, 1), + ("EVENT_090", c_uint8, 1), + ("EVENT_091", c_uint8, 1), + ("EVENT_092", c_uint8, 1), + ("EVENT_093", c_uint8, 1), + ("EVENT_094", c_uint8, 1), + ("EVENT_095", c_uint8, 1), + ("EVENT_096", c_uint8, 1), + ("EVENT_097", c_uint8, 1), + ("EVENT_BEAT_CERULEAN_RIVAL", c_uint8, 1), + ("EVENT_099", c_uint8, 1), + ("EVENT_09A", c_uint8, 1), + ("EVENT_09B", c_uint8, 1), + ("EVENT_09C", c_uint8, 1), + ("EVENT_09D", c_uint8, 1), + ("EVENT_09E", c_uint8, 1), + ("EVENT_09F", c_uint8, 1), + ("EVENT_0A0", c_uint8, 1), + ("EVENT_0A1", c_uint8, 1), + ("EVENT_0A2", c_uint8, 1), + ("EVENT_0A3", c_uint8, 1), + ("EVENT_0A4", c_uint8, 1), + ("EVENT_0A5", c_uint8, 1), + ("EVENT_0A6", c_uint8, 1), + ("EVENT_BEAT_CERULEAN_ROCKET_THIEF", c_uint8, 1), + ("EVENT_0A8", c_uint8, 1), + ("EVENT_0A9", c_uint8, 1), + ("EVENT_0AA", c_uint8, 1), + ("EVENT_0AB", c_uint8, 1), + ("EVENT_0AC", c_uint8, 1), + ("EVENT_0AD", c_uint8, 1), + ("EVENT_0AE", c_uint8, 1), + ("EVENT_0AF", c_uint8, 1), + ("EVENT_0B0", c_uint8, 1), + ("EVENT_0B1", c_uint8, 1), + ("EVENT_0B2", c_uint8, 1), + ("EVENT_0B3", c_uint8, 1), + ("EVENT_0B4", c_uint8, 1), + ("EVENT_0B5", c_uint8, 1), + ("EVENT_0B6", c_uint8, 1), + ("EVENT_0B7", c_uint8, 1), + ("EVENT_0B8", c_uint8, 1), + ("EVENT_0B9", c_uint8, 1), + ("EVENT_BEAT_CERULEAN_GYM_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_CERULEAN_GYM_TRAINER_1", c_uint8, 1), + ("EVENT_0BC", c_uint8, 1), + ("EVENT_0BD", c_uint8, 1), + ("EVENT_GOT_TM11", c_uint8, 1), + ("EVENT_BEAT_MISTY", c_uint8, 1), + ("EVENT_GOT_BICYCLE", c_uint8, 1), + ("EVENT_0C1", c_uint8, 1), + ("EVENT_0C2", c_uint8, 1), + ("EVENT_0C3", c_uint8, 1), + ("EVENT_0C4", c_uint8, 1), + ("EVENT_0C5", c_uint8, 1), + ("EVENT_0C6", c_uint8, 1), + ("EVENT_0C7", c_uint8, 1), + ("EVENT_0C8", c_uint8, 1), + ("EVENT_0C9", c_uint8, 1), + ("EVENT_0CA", c_uint8, 1), + ("EVENT_0CB", c_uint8, 1), + ("EVENT_0CC", c_uint8, 1), + ("EVENT_0CD", c_uint8, 1), + ("EVENT_0CE", c_uint8, 1), + ("EVENT_0CF", c_uint8, 1), + ("EVENT_0D0", c_uint8, 1), + ("EVENT_0D1", c_uint8, 1), + ("EVENT_0D2", c_uint8, 1), + ("EVENT_0D3", c_uint8, 1), + ("EVENT_0D4", c_uint8, 1), + ("EVENT_0D5", c_uint8, 1), + ("EVENT_0D6", c_uint8, 1), + ("EVENT_0D7", c_uint8, 1), + ("EVENT_0D8", c_uint8, 1), + ("EVENT_0D9", c_uint8, 1), + ("EVENT_0DA", c_uint8, 1), + ("EVENT_0DB", c_uint8, 1), + ("EVENT_0DC", c_uint8, 1), + ("EVENT_0DD", c_uint8, 1), + ("EVENT_0DE", c_uint8, 1), + ("EVENT_0DF", c_uint8, 1), + ("EVENT_0E0", c_uint8, 1), + ("EVENT_0E1", c_uint8, 1), + ("EVENT_0E2", c_uint8, 1), + ("EVENT_0E3", c_uint8, 1), + ("EVENT_0E4", c_uint8, 1), + ("EVENT_0E5", c_uint8, 1), + ("EVENT_0E6", c_uint8, 1), + ("EVENT_0E7", c_uint8, 1), + ("EVENT_0E8", c_uint8, 1), + ("EVENT_0E9", c_uint8, 1), + ("EVENT_0EA", c_uint8, 1), + ("EVENT_0EB", c_uint8, 1), + ("EVENT_0EC", c_uint8, 1), + ("EVENT_0ED", c_uint8, 1), + ("EVENT_POKEMON_TOWER_RIVAL_ON_LEFT", c_uint8, 1), + ("EVENT_BEAT_POKEMON_TOWER_RIVAL", c_uint8, 1), + ("EVENT_0F0", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_3_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_3_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_3_TRAINER_2", c_uint8, 1), + ("EVENT_0F4", c_uint8, 1), + ("EVENT_0F5", c_uint8, 1), + ("EVENT_0F6", c_uint8, 1), + ("EVENT_0F7", c_uint8, 1), + ("EVENT_0F8", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_4_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_4_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_4_TRAINER_2", c_uint8, 1), + ("EVENT_0FC", c_uint8, 1), + ("EVENT_0FD", c_uint8, 1), + ("EVENT_0FE", c_uint8, 1), + ("EVENT_0FF", c_uint8, 1), + ("EVENT_100", c_uint8, 1), + ("EVENT_101", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_5_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_5_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_5_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_5_TRAINER_3", c_uint8, 1), + ("EVENT_106", c_uint8, 1), + ("EVENT_IN_PURIFIED_ZONE", c_uint8, 1), + ("EVENT_108", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_6_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_6_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_6_TRAINER_2", c_uint8, 1), + ("EVENT_10C", c_uint8, 1), + ("EVENT_10D", c_uint8, 1), + ("EVENT_10E", c_uint8, 1), + ("EVENT_BEAT_GHOST_MAROWAK", c_uint8, 1), + ("EVENT_110", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_7_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_7_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_POKEMONTOWER_7_TRAINER_2", c_uint8, 1), + ("EVENT_114", c_uint8, 1), + ("EVENT_115", c_uint8, 1), + ("EVENT_116", c_uint8, 1), + ("EVENT_RESCUED_MR_FUJI_2", c_uint8, 1), + ("EVENT_118", c_uint8, 1), + ("EVENT_119", c_uint8, 1), + ("EVENT_11A", c_uint8, 1), + ("EVENT_11B", c_uint8, 1), + ("EVENT_11C", c_uint8, 1), + ("EVENT_11D", c_uint8, 1), + ("EVENT_11E", c_uint8, 1), + ("EVENT_11F", c_uint8, 1), + ("EVENT_120", c_uint8, 1), + ("EVENT_121", c_uint8, 1), + ("EVENT_122", c_uint8, 1), + ("EVENT_123", c_uint8, 1), + ("EVENT_124", c_uint8, 1), + ("EVENT_125", c_uint8, 1), + ("EVENT_126", c_uint8, 1), + ("EVENT_127", c_uint8, 1), + ("EVENT_GOT_POKE_FLUTE", c_uint8, 1), + ("EVENT_129", c_uint8, 1), + ("EVENT_12A", c_uint8, 1), + ("EVENT_12B", c_uint8, 1), + ("EVENT_12C", c_uint8, 1), + ("EVENT_12D", c_uint8, 1), + ("EVENT_12E", c_uint8, 1), + ("EVENT_12F", c_uint8, 1), + ("EVENT_130", c_uint8, 1), + ("EVENT_131", c_uint8, 1), + ("EVENT_132", c_uint8, 1), + ("EVENT_133", c_uint8, 1), + ("EVENT_134", c_uint8, 1), + ("EVENT_135", c_uint8, 1), + ("EVENT_136", c_uint8, 1), + ("EVENT_137", c_uint8, 1), + ("EVENT_138", c_uint8, 1), + ("EVENT_139", c_uint8, 1), + ("EVENT_13A", c_uint8, 1), + ("EVENT_13B", c_uint8, 1), + ("EVENT_13C", c_uint8, 1), + ("EVENT_13D", c_uint8, 1), + ("EVENT_13E", c_uint8, 1), + ("EVENT_13F", c_uint8, 1), + ("EVENT_140", c_uint8, 1), + ("EVENT_141", c_uint8, 1), + ("EVENT_142", c_uint8, 1), + ("EVENT_143", c_uint8, 1), + ("EVENT_144", c_uint8, 1), + ("EVENT_145", c_uint8, 1), + ("EVENT_146", c_uint8, 1), + ("EVENT_147", c_uint8, 1), + ("EVENT_148", c_uint8, 1), + ("EVENT_149", c_uint8, 1), + ("EVENT_14A", c_uint8, 1), + ("EVENT_14B", c_uint8, 1), + ("EVENT_14C", c_uint8, 1), + ("EVENT_14D", c_uint8, 1), + ("EVENT_14E", c_uint8, 1), + ("EVENT_14F", c_uint8, 1), + ("EVENT_150", c_uint8, 1), + ("EVENT_GOT_BIKE_VOUCHER", c_uint8, 1), + ("EVENT_152", c_uint8, 1), + ("EVENT_153", c_uint8, 1), + ("EVENT_154", c_uint8, 1), + ("EVENT_155", c_uint8, 1), + ("EVENT_SEEL_FAN_BOAST", c_uint8, 1), + ("EVENT_PIKACHU_FAN_BOAST", c_uint8, 1), + ("EVENT_158", c_uint8, 1), + ("EVENT_159", c_uint8, 1), + ("EVENT_15A", c_uint8, 1), + ("EVENT_15B", c_uint8, 1), + ("EVENT_15C", c_uint8, 1), + ("EVENT_15D", c_uint8, 1), + ("EVENT_15E", c_uint8, 1), + ("EVENT_15F", c_uint8, 1), + ("EVENT_2ND_LOCK_OPENED", c_uint8, 1), + ("EVENT_1ST_LOCK_OPENED", c_uint8, 1), + ("EVENT_BEAT_VERMILION_GYM_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_VERMILION_GYM_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_VERMILION_GYM_TRAINER_2", c_uint8, 1), + ("EVENT_165", c_uint8, 1), + ("EVENT_GOT_TM24", c_uint8, 1), + ("EVENT_BEAT_LT_SURGE", c_uint8, 1), + ("EVENT_168", c_uint8, 1), + ("EVENT_169", c_uint8, 1), + ("EVENT_16A", c_uint8, 1), + ("EVENT_16B", c_uint8, 1), + ("EVENT_16C", c_uint8, 1), + ("EVENT_16D", c_uint8, 1), + ("EVENT_16E", c_uint8, 1), + ("EVENT_16F", c_uint8, 1), + ("EVENT_170", c_uint8, 1), + ("EVENT_171", c_uint8, 1), + ("EVENT_172", c_uint8, 1), + ("EVENT_173", c_uint8, 1), + ("EVENT_174", c_uint8, 1), + ("EVENT_175", c_uint8, 1), + ("EVENT_176", c_uint8, 1), + ("EVENT_177", c_uint8, 1), + ("EVENT_178", c_uint8, 1), + ("EVENT_179", c_uint8, 1), + ("EVENT_17A", c_uint8, 1), + ("EVENT_17B", c_uint8, 1), + ("EVENT_17C", c_uint8, 1), + ("EVENT_17D", c_uint8, 1), + ("EVENT_17E", c_uint8, 1), + ("EVENT_17F", c_uint8, 1), + ("EVENT_GOT_TM41", c_uint8, 1), + ("EVENT_181", c_uint8, 1), + ("EVENT_182", c_uint8, 1), + ("EVENT_183", c_uint8, 1), + ("EVENT_184", c_uint8, 1), + ("EVENT_185", c_uint8, 1), + ("EVENT_186", c_uint8, 1), + ("EVENT_187", c_uint8, 1), + ("EVENT_188", c_uint8, 1), + ("EVENT_189", c_uint8, 1), + ("EVENT_18A", c_uint8, 1), + ("EVENT_18B", c_uint8, 1), + ("EVENT_GOT_TM13", c_uint8, 1), + ("EVENT_GOT_TM48", c_uint8, 1), + ("EVENT_GOT_TM49", c_uint8, 1), + ("EVENT_GOT_TM18", c_uint8, 1), + ("EVENT_190", c_uint8, 1), + ("EVENT_191", c_uint8, 1), + ("EVENT_192", c_uint8, 1), + ("EVENT_193", c_uint8, 1), + ("EVENT_194", c_uint8, 1), + ("EVENT_195", c_uint8, 1), + ("EVENT_196", c_uint8, 1), + ("EVENT_197", c_uint8, 1), + ("EVENT_198", c_uint8, 1), + ("EVENT_199", c_uint8, 1), + ("EVENT_19A", c_uint8, 1), + ("EVENT_19B", c_uint8, 1), + ("EVENT_19C", c_uint8, 1), + ("EVENT_19D", c_uint8, 1), + ("EVENT_19E", c_uint8, 1), + ("EVENT_19F", c_uint8, 1), + ("EVENT_1A0", c_uint8, 1), + ("EVENT_1A1", c_uint8, 1), + ("EVENT_1A2", c_uint8, 1), + ("EVENT_1A3", c_uint8, 1), + ("EVENT_1A4", c_uint8, 1), + ("EVENT_1A5", c_uint8, 1), + ("EVENT_1A6", c_uint8, 1), + ("EVENT_1A7", c_uint8, 1), + ("EVENT_GOT_TM21", c_uint8, 1), + ("EVENT_BEAT_ERIKA", c_uint8, 1), + ("EVENT_BEAT_CELADON_GYM_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_CELADON_GYM_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_CELADON_GYM_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_CELADON_GYM_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_CELADON_GYM_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_CELADON_GYM_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_CELADON_GYM_TRAINER_6", c_uint8, 1), + ("EVENT_1B1", c_uint8, 1), + ("EVENT_1B2", c_uint8, 1), + ("EVENT_1B3", c_uint8, 1), + ("EVENT_1B4", c_uint8, 1), + ("EVENT_1B5", c_uint8, 1), + ("EVENT_1B6", c_uint8, 1), + ("EVENT_1B7", c_uint8, 1), + ("EVENT_1B8", c_uint8, 1), + ("EVENT_FOUND_ROCKET_HIDEOUT", c_uint8, 1), + ("EVENT_GOT_10_COINS", c_uint8, 1), + ("EVENT_GOT_20_COINS", c_uint8, 1), + ("EVENT_GOT_20_COINS_2", c_uint8, 1), + ("EVENT_1BD", c_uint8, 1), + ("EVENT_1BE", c_uint8, 1), + ("EVENT_1BF", c_uint8, 1), + ("EVENT_1C0", c_uint8, 1), + ("EVENT_1C1", c_uint8, 1), + ("EVENT_1C2", c_uint8, 1), + ("EVENT_1C3", c_uint8, 1), + ("EVENT_1C4", c_uint8, 1), + ("EVENT_1C5", c_uint8, 1), + ("EVENT_1C6", c_uint8, 1), + ("EVENT_1C7", c_uint8, 1), + ("EVENT_1C8", c_uint8, 1), + ("EVENT_1C9", c_uint8, 1), + ("EVENT_1CA", c_uint8, 1), + ("EVENT_1CB", c_uint8, 1), + ("EVENT_1CC", c_uint8, 1), + ("EVENT_1CD", c_uint8, 1), + ("EVENT_1CE", c_uint8, 1), + ("EVENT_1CF", c_uint8, 1), + ("EVENT_1D0", c_uint8, 1), + ("EVENT_1D1", c_uint8, 1), + ("EVENT_1D2", c_uint8, 1), + ("EVENT_1D3", c_uint8, 1), + ("EVENT_1D4", c_uint8, 1), + ("EVENT_1D5", c_uint8, 1), + ("EVENT_1D6", c_uint8, 1), + ("EVENT_1D7", c_uint8, 1), + ("EVENT_1D8", c_uint8, 1), + ("EVENT_1D9", c_uint8, 1), + ("EVENT_1DA", c_uint8, 1), + ("EVENT_1DB", c_uint8, 1), + ("EVENT_1DC", c_uint8, 1), + ("EVENT_1DD", c_uint8, 1), + ("EVENT_1DE", c_uint8, 1), + ("EVENT_1DF", c_uint8, 1), + ("EVENT_GOT_COIN_CASE", c_uint8, 1), + ("EVENT_1E1", c_uint8, 1), + ("EVENT_1E2", c_uint8, 1), + ("EVENT_1E3", c_uint8, 1), + ("EVENT_1E4", c_uint8, 1), + ("EVENT_1E5", c_uint8, 1), + ("EVENT_1E6", c_uint8, 1), + ("EVENT_1E7", c_uint8, 1), + ("EVENT_1E8", c_uint8, 1), + ("EVENT_1E9", c_uint8, 1), + ("EVENT_1EA", c_uint8, 1), + ("EVENT_1EB", c_uint8, 1), + ("EVENT_1EC", c_uint8, 1), + ("EVENT_1ED", c_uint8, 1), + ("EVENT_1EE", c_uint8, 1), + ("EVENT_1EF", c_uint8, 1), + ("EVENT_1F0", c_uint8, 1), + ("EVENT_1F1", c_uint8, 1), + ("EVENT_1F2", c_uint8, 1), + ("EVENT_1F3", c_uint8, 1), + ("EVENT_1F4", c_uint8, 1), + ("EVENT_1F5", c_uint8, 1), + ("EVENT_1F6", c_uint8, 1), + ("EVENT_1F7", c_uint8, 1), + ("EVENT_1F8", c_uint8, 1), + ("EVENT_1F9", c_uint8, 1), + ("EVENT_1FA", c_uint8, 1), + ("EVENT_1FB", c_uint8, 1), + ("EVENT_1FC", c_uint8, 1), + ("EVENT_1FD", c_uint8, 1), + ("EVENT_1FE", c_uint8, 1), + ("EVENT_1FF", c_uint8, 1), + ("EVENT_200", c_uint8, 1), + ("EVENT_201", c_uint8, 1), + ("EVENT_202", c_uint8, 1), + ("EVENT_203", c_uint8, 1), + ("EVENT_204", c_uint8, 1), + ("EVENT_205", c_uint8, 1), + ("EVENT_206", c_uint8, 1), + ("EVENT_207", c_uint8, 1), + ("EVENT_208", c_uint8, 1), + ("EVENT_209", c_uint8, 1), + ("EVENT_20A", c_uint8, 1), + ("EVENT_20B", c_uint8, 1), + ("EVENT_20C", c_uint8, 1), + ("EVENT_20D", c_uint8, 1), + ("EVENT_20E", c_uint8, 1), + ("EVENT_20F", c_uint8, 1), + ("EVENT_210", c_uint8, 1), + ("EVENT_211", c_uint8, 1), + ("EVENT_212", c_uint8, 1), + ("EVENT_213", c_uint8, 1), + ("EVENT_214", c_uint8, 1), + ("EVENT_215", c_uint8, 1), + ("EVENT_216", c_uint8, 1), + ("EVENT_217", c_uint8, 1), + ("EVENT_218", c_uint8, 1), + ("EVENT_219", c_uint8, 1), + ("EVENT_21A", c_uint8, 1), + ("EVENT_21B", c_uint8, 1), + ("EVENT_21C", c_uint8, 1), + ("EVENT_21D", c_uint8, 1), + ("EVENT_21E", c_uint8, 1), + ("EVENT_21F", c_uint8, 1), + ("EVENT_220", c_uint8, 1), + ("EVENT_221", c_uint8, 1), + ("EVENT_222", c_uint8, 1), + ("EVENT_223", c_uint8, 1), + ("EVENT_224", c_uint8, 1), + ("EVENT_225", c_uint8, 1), + ("EVENT_226", c_uint8, 1), + ("EVENT_227", c_uint8, 1), + ("EVENT_228", c_uint8, 1), + ("EVENT_229", c_uint8, 1), + ("EVENT_22A", c_uint8, 1), + ("EVENT_22B", c_uint8, 1), + ("EVENT_22C", c_uint8, 1), + ("EVENT_22D", c_uint8, 1), + ("EVENT_22E", c_uint8, 1), + ("EVENT_22F", c_uint8, 1), + ("EVENT_230", c_uint8, 1), + ("EVENT_231", c_uint8, 1), + ("EVENT_232", c_uint8, 1), + ("EVENT_233", c_uint8, 1), + ("EVENT_234", c_uint8, 1), + ("EVENT_235", c_uint8, 1), + ("EVENT_236", c_uint8, 1), + ("EVENT_237", c_uint8, 1), + ("EVENT_GOT_HM04", c_uint8, 1), + ("EVENT_GAVE_GOLD_TEETH", c_uint8, 1), + ("EVENT_23A", c_uint8, 1), + ("EVENT_23B", c_uint8, 1), + ("EVENT_23C", c_uint8, 1), + ("EVENT_23D", c_uint8, 1), + ("EVENT_23E", c_uint8, 1), + ("EVENT_23F", c_uint8, 1), + ("EVENT_240", c_uint8, 1), + ("EVENT_241", c_uint8, 1), + ("EVENT_242", c_uint8, 1), + ("EVENT_243", c_uint8, 1), + ("EVENT_244", c_uint8, 1), + ("EVENT_245", c_uint8, 1), + ("EVENT_246", c_uint8, 1), + ("EVENT_247", c_uint8, 1), + ("EVENT_248", c_uint8, 1), + ("EVENT_249", c_uint8, 1), + ("EVENT_24A", c_uint8, 1), + ("EVENT_24B", c_uint8, 1), + ("EVENT_24C", c_uint8, 1), + ("EVENT_24D", c_uint8, 1), + ("EVENT_SAFARI_GAME_OVER", c_uint8, 1), + ("EVENT_IN_SAFARI_ZONE", c_uint8, 1), + ("EVENT_250", c_uint8, 1), + ("EVENT_251", c_uint8, 1), + ("EVENT_252", c_uint8, 1), + ("EVENT_253", c_uint8, 1), + ("EVENT_254", c_uint8, 1), + ("EVENT_255", c_uint8, 1), + ("EVENT_256", c_uint8, 1), + ("EVENT_257", c_uint8, 1), + ("EVENT_GOT_TM06", c_uint8, 1), + ("EVENT_BEAT_KOGA", c_uint8, 1), + ("EVENT_BEAT_FUCHSIA_GYM_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_FUCHSIA_GYM_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_FUCHSIA_GYM_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_FUCHSIA_GYM_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_FUCHSIA_GYM_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_FUCHSIA_GYM_TRAINER_5", c_uint8, 1), + ("EVENT_260", c_uint8, 1), + ("EVENT_261", c_uint8, 1), + ("EVENT_262", c_uint8, 1), + ("EVENT_263", c_uint8, 1), + ("EVENT_264", c_uint8, 1), + ("EVENT_265", c_uint8, 1), + ("EVENT_266", c_uint8, 1), + ("EVENT_267", c_uint8, 1), + ("EVENT_268", c_uint8, 1), + ("EVENT_269", c_uint8, 1), + ("EVENT_26A", c_uint8, 1), + ("EVENT_26B", c_uint8, 1), + ("EVENT_26C", c_uint8, 1), + ("EVENT_26D", c_uint8, 1), + ("EVENT_26E", c_uint8, 1), + ("EVENT_26F", c_uint8, 1), + ("EVENT_270", c_uint8, 1), + ("EVENT_271", c_uint8, 1), + ("EVENT_272", c_uint8, 1), + ("EVENT_273", c_uint8, 1), + ("EVENT_274", c_uint8, 1), + ("EVENT_275", c_uint8, 1), + ("EVENT_276", c_uint8, 1), + ("EVENT_277", c_uint8, 1), + ("EVENT_MANSION_SWITCH_ON", c_uint8, 1), + ("EVENT_279", c_uint8, 1), + ("EVENT_27A", c_uint8, 1), + ("EVENT_27B", c_uint8, 1), + ("EVENT_27C", c_uint8, 1), + ("EVENT_27D", c_uint8, 1), + ("EVENT_27E", c_uint8, 1), + ("EVENT_27F", c_uint8, 1), + ("EVENT_280", c_uint8, 1), + ("EVENT_281", c_uint8, 1), + ("EVENT_282", c_uint8, 1), + ("EVENT_283", c_uint8, 1), + ("EVENT_284", c_uint8, 1), + ("EVENT_285", c_uint8, 1), + ("EVENT_286", c_uint8, 1), + ("EVENT_287", c_uint8, 1), + ("EVENT_288", c_uint8, 1), + ("EVENT_BEAT_MANSION_1_TRAINER_0", c_uint8, 1), + ("EVENT_28A", c_uint8, 1), + ("EVENT_28B", c_uint8, 1), + ("EVENT_28C", c_uint8, 1), + ("EVENT_28D", c_uint8, 1), + ("EVENT_28E", c_uint8, 1), + ("EVENT_28F", c_uint8, 1), + ("EVENT_290", c_uint8, 1), + ("EVENT_291", c_uint8, 1), + ("EVENT_292", c_uint8, 1), + ("EVENT_293", c_uint8, 1), + ("EVENT_294", c_uint8, 1), + ("EVENT_295", c_uint8, 1), + ("EVENT_296", c_uint8, 1), + ("EVENT_297", c_uint8, 1), + ("EVENT_GOT_TM38", c_uint8, 1), + ("EVENT_BEAT_BLAINE", c_uint8, 1), + ("EVENT_BEAT_CINNABAR_GYM_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_CINNABAR_GYM_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_CINNABAR_GYM_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_CINNABAR_GYM_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_CINNABAR_GYM_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_CINNABAR_GYM_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_CINNABAR_GYM_TRAINER_6", c_uint8, 1), + ("EVENT_2A1", c_uint8, 1), + ("EVENT_2A2", c_uint8, 1), + ("EVENT_2A3", c_uint8, 1), + ("EVENT_2A4", c_uint8, 1), + ("EVENT_2A5", c_uint8, 1), + ("EVENT_2A6", c_uint8, 1), + ("EVENT_2A7", c_uint8, 1), + ("EVENT_CINNABAR_GYM_GATE0_UNLOCKED", c_uint8, 1), + ("EVENT_CINNABAR_GYM_GATE1_UNLOCKED", c_uint8, 1), + ("EVENT_CINNABAR_GYM_GATE2_UNLOCKED", c_uint8, 1), + ("EVENT_CINNABAR_GYM_GATE3_UNLOCKED", c_uint8, 1), + ("EVENT_CINNABAR_GYM_GATE4_UNLOCKED", c_uint8, 1), + ("EVENT_CINNABAR_GYM_GATE5_UNLOCKED", c_uint8, 1), + ("EVENT_CINNABAR_GYM_GATE6_UNLOCKED", c_uint8, 1), + ("EVENT_2AF", c_uint8, 1), + ("EVENT_2B0", c_uint8, 1), + ("EVENT_2B1", c_uint8, 1), + ("EVENT_2B2", c_uint8, 1), + ("EVENT_2B3", c_uint8, 1), + ("EVENT_2B4", c_uint8, 1), + ("EVENT_2B5", c_uint8, 1), + ("EVENT_2B6", c_uint8, 1), + ("EVENT_2B7", c_uint8, 1), + ("EVENT_2B8", c_uint8, 1), + ("EVENT_2B9", c_uint8, 1), + ("EVENT_2BA", c_uint8, 1), + ("EVENT_2BB", c_uint8, 1), + ("EVENT_2BC", c_uint8, 1), + ("EVENT_2BD", c_uint8, 1), + ("EVENT_2BE", c_uint8, 1), + ("EVENT_2BF", c_uint8, 1), + ("EVENT_2C0", c_uint8, 1), + ("EVENT_2C1", c_uint8, 1), + ("EVENT_2C2", c_uint8, 1), + ("EVENT_2C3", c_uint8, 1), + ("EVENT_2C4", c_uint8, 1), + ("EVENT_2C5", c_uint8, 1), + ("EVENT_2C6", c_uint8, 1), + ("EVENT_2C7", c_uint8, 1), + ("EVENT_2C8", c_uint8, 1), + ("EVENT_2C9", c_uint8, 1), + ("EVENT_2CA", c_uint8, 1), + ("EVENT_2CB", c_uint8, 1), + ("EVENT_2CC", c_uint8, 1), + ("EVENT_2CD", c_uint8, 1), + ("EVENT_2CE", c_uint8, 1), + ("EVENT_2CF", c_uint8, 1), + ("EVENT_2D0", c_uint8, 1), + ("EVENT_2D1", c_uint8, 1), + ("EVENT_2D2", c_uint8, 1), + ("EVENT_2D3", c_uint8, 1), + ("EVENT_2D4", c_uint8, 1), + ("EVENT_2D5", c_uint8, 1), + ("EVENT_2D6", c_uint8, 1), + ("EVENT_GOT_TM35", c_uint8, 1), + ("EVENT_2D8", c_uint8, 1), + ("EVENT_2D9", c_uint8, 1), + ("EVENT_2DA", c_uint8, 1), + ("EVENT_2DB", c_uint8, 1), + ("EVENT_2DC", c_uint8, 1), + ("EVENT_2DD", c_uint8, 1), + ("EVENT_2DE", c_uint8, 1), + ("EVENT_2DF", c_uint8, 1), + ("EVENT_GAVE_FOSSIL_TO_LAB", c_uint8, 1), + ("EVENT_LAB_STILL_REVIVING_FOSSIL", c_uint8, 1), + ("EVENT_LAB_HANDING_OVER_FOSSIL_MON", c_uint8, 1), + ("EVENT_2E3", c_uint8, 1), + ("EVENT_2E4", c_uint8, 1), + ("EVENT_2E5", c_uint8, 1), + ("EVENT_2E6", c_uint8, 1), + ("EVENT_2E7", c_uint8, 1), + ("EVENT_2E8", c_uint8, 1), + ("EVENT_2E9", c_uint8, 1), + ("EVENT_2EA", c_uint8, 1), + ("EVENT_2EB", c_uint8, 1), + ("EVENT_2EC", c_uint8, 1), + ("EVENT_2ED", c_uint8, 1), + ("EVENT_2EE", c_uint8, 1), + ("EVENT_2EF", c_uint8, 1), + ("EVENT_2F0", c_uint8, 1), + ("EVENT_2F1", c_uint8, 1), + ("EVENT_2F2", c_uint8, 1), + ("EVENT_2F3", c_uint8, 1), + ("EVENT_2F4", c_uint8, 1), + ("EVENT_2F5", c_uint8, 1), + ("EVENT_2F6", c_uint8, 1), + ("EVENT_2F7", c_uint8, 1), + ("EVENT_2F8", c_uint8, 1), + ("EVENT_2F9", c_uint8, 1), + ("EVENT_2FA", c_uint8, 1), + ("EVENT_2FB", c_uint8, 1), + ("EVENT_2FC", c_uint8, 1), + ("EVENT_2FD", c_uint8, 1), + ("EVENT_2FE", c_uint8, 1), + ("EVENT_2FF", c_uint8, 1), + ("EVENT_300", c_uint8, 1), + ("EVENT_301", c_uint8, 1), + ("EVENT_302", c_uint8, 1), + ("EVENT_303", c_uint8, 1), + ("EVENT_304", c_uint8, 1), + ("EVENT_305", c_uint8, 1), + ("EVENT_306", c_uint8, 1), + ("EVENT_307", c_uint8, 1), + ("EVENT_308", c_uint8, 1), + ("EVENT_309", c_uint8, 1), + ("EVENT_30A", c_uint8, 1), + ("EVENT_30B", c_uint8, 1), + ("EVENT_30C", c_uint8, 1), + ("EVENT_30D", c_uint8, 1), + ("EVENT_30E", c_uint8, 1), + ("EVENT_30F", c_uint8, 1), + ("EVENT_310", c_uint8, 1), + ("EVENT_311", c_uint8, 1), + ("EVENT_312", c_uint8, 1), + ("EVENT_313", c_uint8, 1), + ("EVENT_314", c_uint8, 1), + ("EVENT_315", c_uint8, 1), + ("EVENT_316", c_uint8, 1), + ("EVENT_317", c_uint8, 1), + ("EVENT_318", c_uint8, 1), + ("EVENT_319", c_uint8, 1), + ("EVENT_31A", c_uint8, 1), + ("EVENT_31B", c_uint8, 1), + ("EVENT_31C", c_uint8, 1), + ("EVENT_31D", c_uint8, 1), + ("EVENT_31E", c_uint8, 1), + ("EVENT_31F", c_uint8, 1), + ("EVENT_320", c_uint8, 1), + ("EVENT_321", c_uint8, 1), + ("EVENT_322", c_uint8, 1), + ("EVENT_323", c_uint8, 1), + ("EVENT_324", c_uint8, 1), + ("EVENT_325", c_uint8, 1), + ("EVENT_326", c_uint8, 1), + ("EVENT_327", c_uint8, 1), + ("EVENT_328", c_uint8, 1), + ("EVENT_329", c_uint8, 1), + ("EVENT_32A", c_uint8, 1), + ("EVENT_32B", c_uint8, 1), + ("EVENT_32C", c_uint8, 1), + ("EVENT_32D", c_uint8, 1), + ("EVENT_32E", c_uint8, 1), + ("EVENT_32F", c_uint8, 1), + ("EVENT_330", c_uint8, 1), + ("EVENT_331", c_uint8, 1), + ("EVENT_332", c_uint8, 1), + ("EVENT_333", c_uint8, 1), + ("EVENT_334", c_uint8, 1), + ("EVENT_335", c_uint8, 1), + ("EVENT_336", c_uint8, 1), + ("EVENT_337", c_uint8, 1), + ("EVENT_338", c_uint8, 1), + ("EVENT_339", c_uint8, 1), + ("EVENT_33A", c_uint8, 1), + ("EVENT_33B", c_uint8, 1), + ("EVENT_33C", c_uint8, 1), + ("EVENT_33D", c_uint8, 1), + ("EVENT_33E", c_uint8, 1), + ("EVENT_33F", c_uint8, 1), + ("EVENT_GOT_TM31", c_uint8, 1), + ("EVENT_341", c_uint8, 1), + ("EVENT_342", c_uint8, 1), + ("EVENT_343", c_uint8, 1), + ("EVENT_344", c_uint8, 1), + ("EVENT_345", c_uint8, 1), + ("EVENT_346", c_uint8, 1), + ("EVENT_347", c_uint8, 1), + ("EVENT_348", c_uint8, 1), + ("EVENT_349", c_uint8, 1), + ("EVENT_34A", c_uint8, 1), + ("EVENT_34B", c_uint8, 1), + ("EVENT_34C", c_uint8, 1), + ("EVENT_34D", c_uint8, 1), + ("EVENT_34E", c_uint8, 1), + ("EVENT_34F", c_uint8, 1), + ("EVENT_DEFEATED_FIGHTING_DOJO", c_uint8, 1), + ("EVENT_BEAT_KARATE_MASTER", c_uint8, 1), + ("EVENT_BEAT_FIGHTING_DOJO_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_FIGHTING_DOJO_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_FIGHTING_DOJO_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_FIGHTING_DOJO_TRAINER_3", c_uint8, 1), + ("EVENT_GOT_HITMONLEE", c_uint8, 1), + ("EVENT_GOT_HITMONCHAN", c_uint8, 1), + ("EVENT_358", c_uint8, 1), + ("EVENT_359", c_uint8, 1), + ("EVENT_35A", c_uint8, 1), + ("EVENT_35B", c_uint8, 1), + ("EVENT_35C", c_uint8, 1), + ("EVENT_35D", c_uint8, 1), + ("EVENT_35E", c_uint8, 1), + ("EVENT_35F", c_uint8, 1), + ("EVENT_GOT_TM46", c_uint8, 1), + ("EVENT_BEAT_SABRINA", c_uint8, 1), + ("EVENT_BEAT_SAFFRON_GYM_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SAFFRON_GYM_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SAFFRON_GYM_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_SAFFRON_GYM_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_SAFFRON_GYM_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_SAFFRON_GYM_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_SAFFRON_GYM_TRAINER_6", c_uint8, 1), + ("EVENT_369", c_uint8, 1), + ("EVENT_36A", c_uint8, 1), + ("EVENT_36B", c_uint8, 1), + ("EVENT_36C", c_uint8, 1), + ("EVENT_36D", c_uint8, 1), + ("EVENT_36E", c_uint8, 1), + ("EVENT_36F", c_uint8, 1), + ("EVENT_370", c_uint8, 1), + ("EVENT_371", c_uint8, 1), + ("EVENT_372", c_uint8, 1), + ("EVENT_373", c_uint8, 1), + ("EVENT_374", c_uint8, 1), + ("EVENT_375", c_uint8, 1), + ("EVENT_376", c_uint8, 1), + ("EVENT_377", c_uint8, 1), + ("EVENT_378", c_uint8, 1), + ("EVENT_379", c_uint8, 1), + ("EVENT_37A", c_uint8, 1), + ("EVENT_37B", c_uint8, 1), + ("EVENT_37C", c_uint8, 1), + ("EVENT_37D", c_uint8, 1), + ("EVENT_37E", c_uint8, 1), + ("EVENT_37F", c_uint8, 1), + ("EVENT_380", c_uint8, 1), + ("EVENT_381", c_uint8, 1), + ("EVENT_382", c_uint8, 1), + ("EVENT_383", c_uint8, 1), + ("EVENT_384", c_uint8, 1), + ("EVENT_385", c_uint8, 1), + ("EVENT_386", c_uint8, 1), + ("EVENT_387", c_uint8, 1), + ("EVENT_388", c_uint8, 1), + ("EVENT_389", c_uint8, 1), + ("EVENT_38A", c_uint8, 1), + ("EVENT_38B", c_uint8, 1), + ("EVENT_38C", c_uint8, 1), + ("EVENT_38D", c_uint8, 1), + ("EVENT_38E", c_uint8, 1), + ("EVENT_38F", c_uint8, 1), + ("EVENT_390", c_uint8, 1), + ("EVENT_391", c_uint8, 1), + ("EVENT_392", c_uint8, 1), + ("EVENT_393", c_uint8, 1), + ("EVENT_394", c_uint8, 1), + ("EVENT_395", c_uint8, 1), + ("EVENT_396", c_uint8, 1), + ("EVENT_SILPH_CO_RECEPTIONIST_AT_DESK", c_uint8, 1), + ("EVENT_398", c_uint8, 1), + ("EVENT_399", c_uint8, 1), + ("EVENT_39A", c_uint8, 1), + ("EVENT_39B", c_uint8, 1), + ("EVENT_39C", c_uint8, 1), + ("EVENT_39D", c_uint8, 1), + ("EVENT_39E", c_uint8, 1), + ("EVENT_39F", c_uint8, 1), + ("EVENT_3A0", c_uint8, 1), + ("EVENT_3A1", c_uint8, 1), + ("EVENT_3A2", c_uint8, 1), + ("EVENT_3A3", c_uint8, 1), + ("EVENT_3A4", c_uint8, 1), + ("EVENT_3A5", c_uint8, 1), + ("EVENT_3A6", c_uint8, 1), + ("EVENT_3A7", c_uint8, 1), + ("EVENT_3A8", c_uint8, 1), + ("EVENT_3A9", c_uint8, 1), + ("EVENT_3AA", c_uint8, 1), + ("EVENT_3AB", c_uint8, 1), + ("EVENT_3AC", c_uint8, 1), + ("EVENT_3AD", c_uint8, 1), + ("EVENT_3AE", c_uint8, 1), + ("EVENT_3AF", c_uint8, 1), + ("EVENT_GOT_TM29", c_uint8, 1), + ("EVENT_3B1", c_uint8, 1), + ("EVENT_3B2", c_uint8, 1), + ("EVENT_3B3", c_uint8, 1), + ("EVENT_3B4", c_uint8, 1), + ("EVENT_3B5", c_uint8, 1), + ("EVENT_3B6", c_uint8, 1), + ("EVENT_3B7", c_uint8, 1), + ("EVENT_3B8", c_uint8, 1), + ("EVENT_3B9", c_uint8, 1), + ("EVENT_3BA", c_uint8, 1), + ("EVENT_3BB", c_uint8, 1), + ("EVENT_3BC", c_uint8, 1), + ("EVENT_3BD", c_uint8, 1), + ("EVENT_3BE", c_uint8, 1), + ("EVENT_3BF", c_uint8, 1), + ("EVENT_GOT_POTION_SAMPLE", c_uint8, 1), + ("EVENT_3C1", c_uint8, 1), + ("EVENT_3C2", c_uint8, 1), + ("EVENT_3C3", c_uint8, 1), + ("EVENT_3C4", c_uint8, 1), + ("EVENT_3C5", c_uint8, 1), + ("EVENT_3C6", c_uint8, 1), + ("EVENT_3C7", c_uint8, 1), + ("EVENT_3C8", c_uint8, 1), + ("EVENT_3C9", c_uint8, 1), + ("EVENT_3CA", c_uint8, 1), + ("EVENT_3CB", c_uint8, 1), + ("EVENT_3CC", c_uint8, 1), + ("EVENT_3CD", c_uint8, 1), + ("EVENT_3CE", c_uint8, 1), + ("EVENT_3CF", c_uint8, 1), + ("EVENT_3D0", c_uint8, 1), + ("EVENT_3D1", c_uint8, 1), + ("EVENT_3D2", c_uint8, 1), + ("EVENT_3D3", c_uint8, 1), + ("EVENT_3D4", c_uint8, 1), + ("EVENT_3D5", c_uint8, 1), + ("EVENT_3D6", c_uint8, 1), + ("EVENT_3D7", c_uint8, 1), + ("EVENT_GOT_HM05", c_uint8, 1), + ("EVENT_3D9", c_uint8, 1), + ("EVENT_3DA", c_uint8, 1), + ("EVENT_3DB", c_uint8, 1), + ("EVENT_3DC", c_uint8, 1), + ("EVENT_3DD", c_uint8, 1), + ("EVENT_3DE", c_uint8, 1), + ("EVENT_3DF", c_uint8, 1), + ("EVENT_3E0", c_uint8, 1), + ("EVENT_3E1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_3_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_3_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_3_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_3_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_3_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_3_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_3_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_3_TRAINER_7", c_uint8, 1), + ("EVENT_3EA", c_uint8, 1), + ("EVENT_3EB", c_uint8, 1), + ("EVENT_3EC", c_uint8, 1), + ("EVENT_3ED", c_uint8, 1), + ("EVENT_3EE", c_uint8, 1), + ("EVENT_3EF", c_uint8, 1), + ("EVENT_3F0", c_uint8, 1), + ("EVENT_3F1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_4_TRAINER_0", c_uint8, 1), + ("EVENT_3F3", c_uint8, 1), + ("EVENT_3F4", c_uint8, 1), + ("EVENT_3F5", c_uint8, 1), + ("EVENT_3F6", c_uint8, 1), + ("EVENT_3F7", c_uint8, 1), + ("EVENT_3F8", c_uint8, 1), + ("EVENT_3F9", c_uint8, 1), + ("EVENT_3FA", c_uint8, 1), + ("EVENT_3FB", c_uint8, 1), + ("EVENT_3FC", c_uint8, 1), + ("EVENT_3FD", c_uint8, 1), + ("EVENT_3FE", c_uint8, 1), + ("EVENT_BOUGHT_MAGIKARP", c_uint8, 1), + ("EVENT_400", c_uint8, 1), + ("EVENT_401", c_uint8, 1), + ("EVENT_402", c_uint8, 1), + ("EVENT_403", c_uint8, 1), + ("EVENT_404", c_uint8, 1), + ("EVENT_405", c_uint8, 1), + ("EVENT_406", c_uint8, 1), + ("EVENT_407", c_uint8, 1), + ("EVENT_408", c_uint8, 1), + ("EVENT_409", c_uint8, 1), + ("EVENT_40A", c_uint8, 1), + ("EVENT_40B", c_uint8, 1), + ("EVENT_40C", c_uint8, 1), + ("EVENT_40D", c_uint8, 1), + ("EVENT_40E", c_uint8, 1), + ("EVENT_40F", c_uint8, 1), + ("EVENT_410", c_uint8, 1), + ("EVENT_BEAT_ROUTE_6_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_6_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_6_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_6_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_6_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_6_TRAINER_5", c_uint8, 1), + ("EVENT_417", c_uint8, 1), + ("EVENT_418", c_uint8, 1), + ("EVENT_419", c_uint8, 1), + ("EVENT_41A", c_uint8, 1), + ("EVENT_41B", c_uint8, 1), + ("EVENT_41C", c_uint8, 1), + ("EVENT_41D", c_uint8, 1), + ("EVENT_41E", c_uint8, 1), + ("EVENT_41F", c_uint8, 1), + ("EVENT_420", c_uint8, 1), + ("EVENT_421", c_uint8, 1), + ("EVENT_422", c_uint8, 1), + ("EVENT_423", c_uint8, 1), + ("EVENT_424", c_uint8, 1), + ("EVENT_425", c_uint8, 1), + ("EVENT_426", c_uint8, 1), + ("EVENT_427", c_uint8, 1), + ("EVENT_428", c_uint8, 1), + ("EVENT_429", c_uint8, 1), + ("EVENT_42A", c_uint8, 1), + ("EVENT_42B", c_uint8, 1), + ("EVENT_42C", c_uint8, 1), + ("EVENT_42D", c_uint8, 1), + ("EVENT_42E", c_uint8, 1), + ("EVENT_42F", c_uint8, 1), + ("EVENT_430", c_uint8, 1), + ("EVENT_BEAT_ROUTE_8_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_8_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_8_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_8_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_8_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_8_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_8_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_8_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_8_TRAINER_8", c_uint8, 1), + ("EVENT_43A", c_uint8, 1), + ("EVENT_43B", c_uint8, 1), + ("EVENT_43C", c_uint8, 1), + ("EVENT_43D", c_uint8, 1), + ("EVENT_43E", c_uint8, 1), + ("EVENT_43F", c_uint8, 1), + ("EVENT_440", c_uint8, 1), + ("EVENT_BEAT_ROUTE_9_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_9_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_9_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_9_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_9_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_9_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_9_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_9_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_9_TRAINER_8", c_uint8, 1), + ("EVENT_44A", c_uint8, 1), + ("EVENT_44B", c_uint8, 1), + ("EVENT_44C", c_uint8, 1), + ("EVENT_44D", c_uint8, 1), + ("EVENT_44E", c_uint8, 1), + ("EVENT_44F", c_uint8, 1), + ("EVENT_450", c_uint8, 1), + ("EVENT_BEAT_ROUTE_10_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_10_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_10_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_10_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_10_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_10_TRAINER_5", c_uint8, 1), + ("EVENT_457", c_uint8, 1), + ("EVENT_458", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6", c_uint8, 1), + ("EVENT_460", c_uint8, 1), + ("EVENT_BEAT_POWER_PLANT_VOLTORB_0", c_uint8, 1), + ("EVENT_BEAT_POWER_PLANT_VOLTORB_1", c_uint8, 1), + ("EVENT_BEAT_POWER_PLANT_VOLTORB_2", c_uint8, 1), + ("EVENT_BEAT_POWER_PLANT_VOLTORB_3", c_uint8, 1), + ("EVENT_BEAT_POWER_PLANT_VOLTORB_4", c_uint8, 1), + ("EVENT_BEAT_POWER_PLANT_VOLTORB_5", c_uint8, 1), + ("EVENT_BEAT_POWER_PLANT_VOLTORB_6", c_uint8, 1), + ("EVENT_BEAT_POWER_PLANT_VOLTORB_7", c_uint8, 1), + ("EVENT_BEAT_ZAPDOS", c_uint8, 1), + ("EVENT_46A", c_uint8, 1), + ("EVENT_46B", c_uint8, 1), + ("EVENT_46C", c_uint8, 1), + ("EVENT_46D", c_uint8, 1), + ("EVENT_46E", c_uint8, 1), + ("EVENT_46F", c_uint8, 1), + ("EVENT_470", c_uint8, 1), + ("EVENT_BEAT_ROUTE_11_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_11_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_11_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_11_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_11_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_11_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_11_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_11_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_11_TRAINER_8", c_uint8, 1), + ("EVENT_BEAT_ROUTE_11_TRAINER_9", c_uint8, 1), + ("EVENT_47B", c_uint8, 1), + ("EVENT_47C", c_uint8, 1), + ("EVENT_47D", c_uint8, 1), + ("EVENT_47E", c_uint8, 1), + ("EVENT_GOT_ITEMFINDER", c_uint8, 1), + ("EVENT_GOT_TM39", c_uint8, 1), + ("EVENT_481", c_uint8, 1), + ("EVENT_BEAT_ROUTE_12_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_12_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_12_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_12_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_12_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_12_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_12_TRAINER_6", c_uint8, 1), + ("EVENT_489", c_uint8, 1), + ("EVENT_48A", c_uint8, 1), + ("EVENT_48B", c_uint8, 1), + ("EVENT_48C", c_uint8, 1), + ("EVENT_48D", c_uint8, 1), + ("EVENT_FIGHT_ROUTE12_SNORLAX", c_uint8, 1), + ("EVENT_BEAT_ROUTE12_SNORLAX", c_uint8, 1), + ("EVENT_490", c_uint8, 1), + ("EVENT_BEAT_ROUTE_13_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_13_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_13_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_13_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_13_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_13_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_13_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_13_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_13_TRAINER_8", c_uint8, 1), + ("EVENT_BEAT_ROUTE_13_TRAINER_9", c_uint8, 1), + ("EVENT_49B", c_uint8, 1), + ("EVENT_49C", c_uint8, 1), + ("EVENT_49D", c_uint8, 1), + ("EVENT_49E", c_uint8, 1), + ("EVENT_49F", c_uint8, 1), + ("EVENT_4A0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_14_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_14_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_14_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_14_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_14_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_14_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_14_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_14_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_14_TRAINER_8", c_uint8, 1), + ("EVENT_BEAT_ROUTE_14_TRAINER_9", c_uint8, 1), + ("EVENT_4AB", c_uint8, 1), + ("EVENT_4AC", c_uint8, 1), + ("EVENT_4AD", c_uint8, 1), + ("EVENT_4AE", c_uint8, 1), + ("EVENT_4AF", c_uint8, 1), + ("EVENT_GOT_EXP_ALL", c_uint8, 1), + ("EVENT_BEAT_ROUTE_15_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_15_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_15_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_15_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_15_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_15_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_15_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_15_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_15_TRAINER_8", c_uint8, 1), + ("EVENT_BEAT_ROUTE_15_TRAINER_9", c_uint8, 1), + ("EVENT_4BB", c_uint8, 1), + ("EVENT_4BC", c_uint8, 1), + ("EVENT_4BD", c_uint8, 1), + ("EVENT_4BE", c_uint8, 1), + ("EVENT_4BF", c_uint8, 1), + ("EVENT_4C0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_16_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_16_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_16_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_16_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_16_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_16_TRAINER_5", c_uint8, 1), + ("EVENT_4C7", c_uint8, 1), + ("EVENT_FIGHT_ROUTE16_SNORLAX", c_uint8, 1), + ("EVENT_BEAT_ROUTE16_SNORLAX", c_uint8, 1), + ("EVENT_4CA", c_uint8, 1), + ("EVENT_4CB", c_uint8, 1), + ("EVENT_4CC", c_uint8, 1), + ("EVENT_4CD", c_uint8, 1), + ("EVENT_GOT_HM02", c_uint8, 1), + ("EVENT_RESCUED_MR_FUJI", c_uint8, 1), + ("EVENT_4D0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_17_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_17_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_17_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_17_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_17_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_17_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_17_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_17_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_17_TRAINER_8", c_uint8, 1), + ("EVENT_BEAT_ROUTE_17_TRAINER_9", c_uint8, 1), + ("EVENT_4DB", c_uint8, 1), + ("EVENT_4DC", c_uint8, 1), + ("EVENT_4DD", c_uint8, 1), + ("EVENT_4DE", c_uint8, 1), + ("EVENT_4DF", c_uint8, 1), + ("EVENT_4E0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_18_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_18_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_18_TRAINER_2", c_uint8, 1), + ("EVENT_4E4", c_uint8, 1), + ("EVENT_4E5", c_uint8, 1), + ("EVENT_4E6", c_uint8, 1), + ("EVENT_4E7", c_uint8, 1), + ("EVENT_4E8", c_uint8, 1), + ("EVENT_4E9", c_uint8, 1), + ("EVENT_4EA", c_uint8, 1), + ("EVENT_4EB", c_uint8, 1), + ("EVENT_4EC", c_uint8, 1), + ("EVENT_4ED", c_uint8, 1), + ("EVENT_4EE", c_uint8, 1), + ("EVENT_4EF", c_uint8, 1), + ("EVENT_4F0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_19_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_19_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_19_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_19_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_19_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_19_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_19_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_19_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_19_TRAINER_8", c_uint8, 1), + ("EVENT_BEAT_ROUTE_19_TRAINER_9", c_uint8, 1), + ("EVENT_4FB", c_uint8, 1), + ("EVENT_4FC", c_uint8, 1), + ("EVENT_4FD", c_uint8, 1), + ("EVENT_4FE", c_uint8, 1), + ("EVENT_4FF", c_uint8, 1), + ("EVENT_IN_SEAFOAM_ISLANDS", c_uint8, 1), + ("EVENT_BEAT_ROUTE_20_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_20_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_20_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_20_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_20_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_20_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_20_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_20_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_20_TRAINER_8", c_uint8, 1), + ("EVENT_BEAT_ROUTE_20_TRAINER_9", c_uint8, 1), + ("EVENT_50B", c_uint8, 1), + ("EVENT_50C", c_uint8, 1), + ("EVENT_50D", c_uint8, 1), + ("EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE", c_uint8, 1), + ("EVENT_SEAFOAM1_BOULDER2_DOWN_HOLE", c_uint8, 1), + ("EVENT_510", c_uint8, 1), + ("EVENT_BEAT_ROUTE_21_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_21_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_21_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_21_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_21_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_21_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_21_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_21_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_21_TRAINER_8", c_uint8, 1), + ("EVENT_51A", c_uint8, 1), + ("EVENT_51B", c_uint8, 1), + ("EVENT_51C", c_uint8, 1), + ("EVENT_51D", c_uint8, 1), + ("EVENT_51E", c_uint8, 1), + ("EVENT_51F", c_uint8, 1), + ("EVENT_1ST_ROUTE22_RIVAL_BATTLE", c_uint8, 1), + ("EVENT_2ND_ROUTE22_RIVAL_BATTLE", c_uint8, 1), + ("EVENT_522", c_uint8, 1), + ("EVENT_523", c_uint8, 1), + ("EVENT_524", c_uint8, 1), + ("EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE", c_uint8, 1), + ("EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE", c_uint8, 1), + ("EVENT_ROUTE22_RIVAL_WANTS_BATTLE", c_uint8, 1), + ("EVENT_528", c_uint8, 1), + ("EVENT_529", c_uint8, 1), + ("EVENT_52A", c_uint8, 1), + ("EVENT_52B", c_uint8, 1), + ("EVENT_52C", c_uint8, 1), + ("EVENT_52D", c_uint8, 1), + ("EVENT_52E", c_uint8, 1), + ("EVENT_52F", c_uint8, 1), + ("EVENT_PASSED_CASCADEBADGE_CHECK", c_uint8, 1), + ("EVENT_PASSED_THUNDERBADGE_CHECK", c_uint8, 1), + ("EVENT_PASSED_RAINBOWBADGE_CHECK", c_uint8, 1), + ("EVENT_PASSED_SOULBADGE_CHECK", c_uint8, 1), + ("EVENT_PASSED_MARSHBADGE_CHECK", c_uint8, 1), + ("EVENT_PASSED_VOLCANOBADGE_CHECK", c_uint8, 1), + ("EVENT_PASSED_EARTHBADGE_CHECK", c_uint8, 1), + ("EVENT_537", c_uint8, 1), + ("EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_MOLTRES", c_uint8, 1), + ("EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2", c_uint8, 1), + ("EVENT_GOT_NUGGET", c_uint8, 1), + ("EVENT_BEAT_ROUTE24_ROCKET", c_uint8, 1), + ("EVENT_BEAT_ROUTE_24_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_24_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_24_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_24_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_24_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_24_TRAINER_5", c_uint8, 1), + ("EVENT_548", c_uint8, 1), + ("EVENT_NUGGET_REWARD_AVAILABLE", c_uint8, 1), + ("EVENT_54A", c_uint8, 1), + ("EVENT_54B", c_uint8, 1), + ("EVENT_54C", c_uint8, 1), + ("EVENT_54D", c_uint8, 1), + ("EVENT_54E", c_uint8, 1), + ("EVENT_54F", c_uint8, 1), + ("EVENT_MET_BILL", c_uint8, 1), + ("EVENT_BEAT_ROUTE_25_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROUTE_25_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROUTE_25_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROUTE_25_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROUTE_25_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROUTE_25_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROUTE_25_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROUTE_25_TRAINER_7", c_uint8, 1), + ("EVENT_BEAT_ROUTE_25_TRAINER_8", c_uint8, 1), + ("EVENT_55A", c_uint8, 1), + ("EVENT_USED_CELL_SEPARATOR_ON_BILL", c_uint8, 1), + ("EVENT_GOT_SS_TICKET", c_uint8, 1), + ("EVENT_MET_BILL_2", c_uint8, 1), + ("EVENT_BILL_SAID_USE_CELL_SEPARATOR", c_uint8, 1), + ("EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING", c_uint8, 1), + ("EVENT_560", c_uint8, 1), + ("EVENT_561", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2", c_uint8, 1), + ("EVENT_565", c_uint8, 1), + ("EVENT_566", c_uint8, 1), + ("EVENT_567", c_uint8, 1), + ("EVENT_568", c_uint8, 1), + ("EVENT_569", c_uint8, 1), + ("EVENT_56A", c_uint8, 1), + ("EVENT_56B", c_uint8, 1), + ("EVENT_56C", c_uint8, 1), + ("EVENT_56D", c_uint8, 1), + ("EVENT_56E", c_uint8, 1), + ("EVENT_56F", c_uint8, 1), + ("EVENT_570", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_1_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_1_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_1_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_1_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_1_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_1_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_1_TRAINER_6", c_uint8, 1), + ("EVENT_578", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_3_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_3_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_3_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_MT_MOON_3_TRAINER_3", c_uint8, 1), + ("EVENT_GOT_DOME_FOSSIL", c_uint8, 1), + ("EVENT_GOT_HELIX_FOSSIL", c_uint8, 1), + ("EVENT_580", c_uint8, 1), + ("EVENT_581", c_uint8, 1), + ("EVENT_582", c_uint8, 1), + ("EVENT_583", c_uint8, 1), + ("EVENT_584", c_uint8, 1), + ("EVENT_585", c_uint8, 1), + ("EVENT_586", c_uint8, 1), + ("EVENT_587", c_uint8, 1), + ("EVENT_588", c_uint8, 1), + ("EVENT_589", c_uint8, 1), + ("EVENT_58A", c_uint8, 1), + ("EVENT_58B", c_uint8, 1), + ("EVENT_58C", c_uint8, 1), + ("EVENT_58D", c_uint8, 1), + ("EVENT_58E", c_uint8, 1), + ("EVENT_58F", c_uint8, 1), + ("EVENT_590", c_uint8, 1), + ("EVENT_591", c_uint8, 1), + ("EVENT_592", c_uint8, 1), + ("EVENT_593", c_uint8, 1), + ("EVENT_594", c_uint8, 1), + ("EVENT_595", c_uint8, 1), + ("EVENT_596", c_uint8, 1), + ("EVENT_597", c_uint8, 1), + ("EVENT_598", c_uint8, 1), + ("EVENT_599", c_uint8, 1), + ("EVENT_59A", c_uint8, 1), + ("EVENT_59B", c_uint8, 1), + ("EVENT_59C", c_uint8, 1), + ("EVENT_59D", c_uint8, 1), + ("EVENT_59E", c_uint8, 1), + ("EVENT_59F", c_uint8, 1), + ("EVENT_5A0", c_uint8, 1), + ("EVENT_5A1", c_uint8, 1), + ("EVENT_5A2", c_uint8, 1), + ("EVENT_5A3", c_uint8, 1), + ("EVENT_5A4", c_uint8, 1), + ("EVENT_5A5", c_uint8, 1), + ("EVENT_5A6", c_uint8, 1), + ("EVENT_5A7", c_uint8, 1), + ("EVENT_5A8", c_uint8, 1), + ("EVENT_5A9", c_uint8, 1), + ("EVENT_5AA", c_uint8, 1), + ("EVENT_5AB", c_uint8, 1), + ("EVENT_5AC", c_uint8, 1), + ("EVENT_5AD", c_uint8, 1), + ("EVENT_5AE", c_uint8, 1), + ("EVENT_5AF", c_uint8, 1), + ("EVENT_5B0", c_uint8, 1), + ("EVENT_5B1", c_uint8, 1), + ("EVENT_5B2", c_uint8, 1), + ("EVENT_5B3", c_uint8, 1), + ("EVENT_5B4", c_uint8, 1), + ("EVENT_5B5", c_uint8, 1), + ("EVENT_5B6", c_uint8, 1), + ("EVENT_5B7", c_uint8, 1), + ("EVENT_5B8", c_uint8, 1), + ("EVENT_5B9", c_uint8, 1), + ("EVENT_5BA", c_uint8, 1), + ("EVENT_5BB", c_uint8, 1), + ("EVENT_5BC", c_uint8, 1), + ("EVENT_5BD", c_uint8, 1), + ("EVENT_5BE", c_uint8, 1), + ("EVENT_5BF", c_uint8, 1), + ("EVENT_5C0", c_uint8, 1), + ("EVENT_5C1", c_uint8, 1), + ("EVENT_5C2", c_uint8, 1), + ("EVENT_5C3", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_5_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_5_TRAINER_1", c_uint8, 1), + ("EVENT_5C6", c_uint8, 1), + ("EVENT_5C7", c_uint8, 1), + ("EVENT_5C8", c_uint8, 1), + ("EVENT_5C9", c_uint8, 1), + ("EVENT_5CA", c_uint8, 1), + ("EVENT_5CB", c_uint8, 1), + ("EVENT_5CC", c_uint8, 1), + ("EVENT_5CD", c_uint8, 1), + ("EVENT_5CE", c_uint8, 1), + ("EVENT_5CF", c_uint8, 1), + ("EVENT_5D0", c_uint8, 1), + ("EVENT_5D1", c_uint8, 1), + ("EVENT_5D2", c_uint8, 1), + ("EVENT_5D3", c_uint8, 1), + ("EVENT_5D4", c_uint8, 1), + ("EVENT_5D5", c_uint8, 1), + ("EVENT_5D6", c_uint8, 1), + ("EVENT_5D7", c_uint8, 1), + ("EVENT_5D8", c_uint8, 1), + ("EVENT_5D9", c_uint8, 1), + ("EVENT_5DA", c_uint8, 1), + ("EVENT_5DB", c_uint8, 1), + ("EVENT_5DC", c_uint8, 1), + ("EVENT_5DD", c_uint8, 1), + ("EVENT_5DE", c_uint8, 1), + ("EVENT_5DF", c_uint8, 1), + ("EVENT_GOT_HM01", c_uint8, 1), + ("EVENT_RUBBED_CAPTAINS_BACK", c_uint8, 1), + ("EVENT_SS_ANNE_LEFT", c_uint8, 1), + ("EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT", c_uint8, 1), + ("EVENT_STARTED_WALKING_OUT_OF_DOCK", c_uint8, 1), + ("EVENT_WALKED_OUT_OF_DOCK", c_uint8, 1), + ("EVENT_5E6", c_uint8, 1), + ("EVENT_5E7", c_uint8, 1), + ("EVENT_5E8", c_uint8, 1), + ("EVENT_5E9", c_uint8, 1), + ("EVENT_5EA", c_uint8, 1), + ("EVENT_5EB", c_uint8, 1), + ("EVENT_5EC", c_uint8, 1), + ("EVENT_5ED", c_uint8, 1), + ("EVENT_5EE", c_uint8, 1), + ("EVENT_5EF", c_uint8, 1), + ("EVENT_5F0", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_8_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_8_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_8_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_8_TRAINER_3", c_uint8, 1), + ("EVENT_5F5", c_uint8, 1), + ("EVENT_5F6", c_uint8, 1), + ("EVENT_5F7", c_uint8, 1), + ("EVENT_5F8", c_uint8, 1), + ("EVENT_5F9", c_uint8, 1), + ("EVENT_5FA", c_uint8, 1), + ("EVENT_5FB", c_uint8, 1), + ("EVENT_5FC", c_uint8, 1), + ("EVENT_5FD", c_uint8, 1), + ("EVENT_5FE", c_uint8, 1), + ("EVENT_5FF", c_uint8, 1), + ("EVENT_600", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_9_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_9_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_9_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_9_TRAINER_3", c_uint8, 1), + ("EVENT_605", c_uint8, 1), + ("EVENT_606", c_uint8, 1), + ("EVENT_607", c_uint8, 1), + ("EVENT_608", c_uint8, 1), + ("EVENT_609", c_uint8, 1), + ("EVENT_60A", c_uint8, 1), + ("EVENT_60B", c_uint8, 1), + ("EVENT_60C", c_uint8, 1), + ("EVENT_60D", c_uint8, 1), + ("EVENT_60E", c_uint8, 1), + ("EVENT_60F", c_uint8, 1), + ("EVENT_610", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_10_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_10_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_10_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_10_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_10_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_SS_ANNE_10_TRAINER_5", c_uint8, 1), + ("EVENT_617", c_uint8, 1), + ("EVENT_618", c_uint8, 1), + ("EVENT_619", c_uint8, 1), + ("EVENT_61A", c_uint8, 1), + ("EVENT_61B", c_uint8, 1), + ("EVENT_61C", c_uint8, 1), + ("EVENT_61D", c_uint8, 1), + ("EVENT_61E", c_uint8, 1), + ("EVENT_61F", c_uint8, 1), + ("EVENT_620", c_uint8, 1), + ("EVENT_621", c_uint8, 1), + ("EVENT_622", c_uint8, 1), + ("EVENT_623", c_uint8, 1), + ("EVENT_624", c_uint8, 1), + ("EVENT_625", c_uint8, 1), + ("EVENT_626", c_uint8, 1), + ("EVENT_627", c_uint8, 1), + ("EVENT_628", c_uint8, 1), + ("EVENT_629", c_uint8, 1), + ("EVENT_62A", c_uint8, 1), + ("EVENT_62B", c_uint8, 1), + ("EVENT_62C", c_uint8, 1), + ("EVENT_62D", c_uint8, 1), + ("EVENT_62E", c_uint8, 1), + ("EVENT_62F", c_uint8, 1), + ("EVENT_630", c_uint8, 1), + ("EVENT_631", c_uint8, 1), + ("EVENT_632", c_uint8, 1), + ("EVENT_633", c_uint8, 1), + ("EVENT_634", c_uint8, 1), + ("EVENT_635", c_uint8, 1), + ("EVENT_636", c_uint8, 1), + ("EVENT_637", c_uint8, 1), + ("EVENT_638", c_uint8, 1), + ("EVENT_639", c_uint8, 1), + ("EVENT_63A", c_uint8, 1), + ("EVENT_63B", c_uint8, 1), + ("EVENT_63C", c_uint8, 1), + ("EVENT_63D", c_uint8, 1), + ("EVENT_63E", c_uint8, 1), + ("EVENT_63F", c_uint8, 1), + ("EVENT_640", c_uint8, 1), + ("EVENT_641", c_uint8, 1), + ("EVENT_642", c_uint8, 1), + ("EVENT_643", c_uint8, 1), + ("EVENT_644", c_uint8, 1), + ("EVENT_645", c_uint8, 1), + ("EVENT_646", c_uint8, 1), + ("EVENT_647", c_uint8, 1), + ("EVENT_648", c_uint8, 1), + ("EVENT_649", c_uint8, 1), + ("EVENT_64A", c_uint8, 1), + ("EVENT_64B", c_uint8, 1), + ("EVENT_64C", c_uint8, 1), + ("EVENT_64D", c_uint8, 1), + ("EVENT_64E", c_uint8, 1), + ("EVENT_64F", c_uint8, 1), + ("EVENT_650", c_uint8, 1), + ("EVENT_651", c_uint8, 1), + ("EVENT_652", c_uint8, 1), + ("EVENT_653", c_uint8, 1), + ("EVENT_654", c_uint8, 1), + ("EVENT_655", c_uint8, 1), + ("EVENT_656", c_uint8, 1), + ("EVENT_657", c_uint8, 1), + ("EVENT_658", c_uint8, 1), + ("EVENT_659", c_uint8, 1), + ("EVENT_65A", c_uint8, 1), + ("EVENT_65B", c_uint8, 1), + ("EVENT_65C", c_uint8, 1), + ("EVENT_65D", c_uint8, 1), + ("EVENT_65E", c_uint8, 1), + ("EVENT_65F", c_uint8, 1), + ("EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3", c_uint8, 1), + ("EVENT_665", c_uint8, 1), + ("EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2", c_uint8, 1), + ("EVENT_667", c_uint8, 1), + ("EVENT_668", c_uint8, 1), + ("EVENT_669", c_uint8, 1), + ("EVENT_66A", c_uint8, 1), + ("EVENT_66B", c_uint8, 1), + ("EVENT_66C", c_uint8, 1), + ("EVENT_66D", c_uint8, 1), + ("EVENT_66E", c_uint8, 1), + ("EVENT_66F", c_uint8, 1), + ("EVENT_670", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4", c_uint8, 1), + ("EVENT_676", c_uint8, 1), + ("EVENT_677", c_uint8, 1), + ("EVENT_678", c_uint8, 1), + ("EVENT_679", c_uint8, 1), + ("EVENT_67A", c_uint8, 1), + ("EVENT_67B", c_uint8, 1), + ("EVENT_67C", c_uint8, 1), + ("EVENT_67D", c_uint8, 1), + ("EVENT_67E", c_uint8, 1), + ("EVENT_67F", c_uint8, 1), + ("EVENT_680", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0", c_uint8, 1), + ("EVENT_682", c_uint8, 1), + ("EVENT_683", c_uint8, 1), + ("EVENT_684", c_uint8, 1), + ("EVENT_685", c_uint8, 1), + ("EVENT_686", c_uint8, 1), + ("EVENT_687", c_uint8, 1), + ("EVENT_688", c_uint8, 1), + ("EVENT_689", c_uint8, 1), + ("EVENT_68A", c_uint8, 1), + ("EVENT_68B", c_uint8, 1), + ("EVENT_68C", c_uint8, 1), + ("EVENT_68D", c_uint8, 1), + ("EVENT_68E", c_uint8, 1), + ("EVENT_68F", c_uint8, 1), + ("EVENT_690", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1", c_uint8, 1), + ("EVENT_693", c_uint8, 1), + ("EVENT_694", c_uint8, 1), + ("EVENT_695", c_uint8, 1), + ("EVENT_696", c_uint8, 1), + ("EVENT_697", c_uint8, 1), + ("EVENT_698", c_uint8, 1), + ("EVENT_699", c_uint8, 1), + ("EVENT_69A", c_uint8, 1), + ("EVENT_69B", c_uint8, 1), + ("EVENT_69C", c_uint8, 1), + ("EVENT_69D", c_uint8, 1), + ("EVENT_69E", c_uint8, 1), + ("EVENT_69F", c_uint8, 1), + ("EVENT_6A0", c_uint8, 1), + ("EVENT_6A1", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2", c_uint8, 1), + ("EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED", c_uint8, 1), + ("EVENT_ROCKET_DROPPED_LIFT_KEY", c_uint8, 1), + ("EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI", c_uint8, 1), + ("EVENT_6A8", c_uint8, 1), + ("EVENT_6A9", c_uint8, 1), + ("EVENT_6AA", c_uint8, 1), + ("EVENT_6AB", c_uint8, 1), + ("EVENT_6AC", c_uint8, 1), + ("EVENT_6AD", c_uint8, 1), + ("EVENT_6AE", c_uint8, 1), + ("EVENT_6AF", c_uint8, 1), + ("EVENT_6B0", c_uint8, 1), + ("EVENT_6B1", c_uint8, 1), + ("EVENT_6B2", c_uint8, 1), + ("EVENT_6B3", c_uint8, 1), + ("EVENT_6B4", c_uint8, 1), + ("EVENT_6B5", c_uint8, 1), + ("EVENT_6B6", c_uint8, 1), + ("EVENT_6B7", c_uint8, 1), + ("EVENT_6B8", c_uint8, 1), + ("EVENT_6B9", c_uint8, 1), + ("EVENT_6BA", c_uint8, 1), + ("EVENT_6BB", c_uint8, 1), + ("EVENT_6BC", c_uint8, 1), + ("EVENT_6BD", c_uint8, 1), + ("EVENT_6BE", c_uint8, 1), + ("EVENT_6BF", c_uint8, 1), + ("EVENT_6C0", c_uint8, 1), + ("EVENT_6C1", c_uint8, 1), + ("EVENT_6C2", c_uint8, 1), + ("EVENT_6C3", c_uint8, 1), + ("EVENT_6C4", c_uint8, 1), + ("EVENT_6C5", c_uint8, 1), + ("EVENT_6C6", c_uint8, 1), + ("EVENT_6C7", c_uint8, 1), + ("EVENT_6C8", c_uint8, 1), + ("EVENT_6C9", c_uint8, 1), + ("EVENT_6CA", c_uint8, 1), + ("EVENT_6CB", c_uint8, 1), + ("EVENT_6CC", c_uint8, 1), + ("EVENT_6CD", c_uint8, 1), + ("EVENT_6CE", c_uint8, 1), + ("EVENT_6CF", c_uint8, 1), + ("EVENT_6D0", c_uint8, 1), + ("EVENT_6D1", c_uint8, 1), + ("EVENT_6D2", c_uint8, 1), + ("EVENT_6D3", c_uint8, 1), + ("EVENT_6D4", c_uint8, 1), + ("EVENT_6D5", c_uint8, 1), + ("EVENT_6D6", c_uint8, 1), + ("EVENT_6D7", c_uint8, 1), + ("EVENT_6D8", c_uint8, 1), + ("EVENT_6D9", c_uint8, 1), + ("EVENT_6DA", c_uint8, 1), + ("EVENT_6DB", c_uint8, 1), + ("EVENT_6DC", c_uint8, 1), + ("EVENT_6DD", c_uint8, 1), + ("EVENT_6DE", c_uint8, 1), + ("EVENT_6DF", c_uint8, 1), + ("EVENT_6E0", c_uint8, 1), + ("EVENT_6E1", c_uint8, 1), + ("EVENT_6E2", c_uint8, 1), + ("EVENT_6E3", c_uint8, 1), + ("EVENT_6E4", c_uint8, 1), + ("EVENT_6E5", c_uint8, 1), + ("EVENT_6E6", c_uint8, 1), + ("EVENT_6E7", c_uint8, 1), + ("EVENT_6E8", c_uint8, 1), + ("EVENT_6E9", c_uint8, 1), + ("EVENT_6EA", c_uint8, 1), + ("EVENT_6EB", c_uint8, 1), + ("EVENT_6EC", c_uint8, 1), + ("EVENT_6ED", c_uint8, 1), + ("EVENT_6EE", c_uint8, 1), + ("EVENT_6EF", c_uint8, 1), + ("EVENT_6F0", c_uint8, 1), + ("EVENT_6F1", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_2F_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_2F_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_2F_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_2F_TRAINER_3", c_uint8, 1), + ("EVENT_6F6", c_uint8, 1), + ("EVENT_6F7", c_uint8, 1), + ("EVENT_6F8", c_uint8, 1), + ("EVENT_6F9", c_uint8, 1), + ("EVENT_6FA", c_uint8, 1), + ("EVENT_6FB", c_uint8, 1), + ("EVENT_6FC", c_uint8, 1), + ("EVENT_SILPH_CO_2_UNLOCKED_DOOR1", c_uint8, 1), + ("EVENT_SILPH_CO_2_UNLOCKED_DOOR2", c_uint8, 1), + ("EVENT_GOT_TM36", c_uint8, 1), + ("EVENT_700", c_uint8, 1), + ("EVENT_701", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_3F_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_3F_TRAINER_1", c_uint8, 1), + ("EVENT_704", c_uint8, 1), + ("EVENT_705", c_uint8, 1), + ("EVENT_706", c_uint8, 1), + ("EVENT_707", c_uint8, 1), + ("EVENT_SILPH_CO_3_UNLOCKED_DOOR1", c_uint8, 1), + ("EVENT_SILPH_CO_3_UNLOCKED_DOOR2", c_uint8, 1), + ("EVENT_70A", c_uint8, 1), + ("EVENT_70B", c_uint8, 1), + ("EVENT_70C", c_uint8, 1), + ("EVENT_70D", c_uint8, 1), + ("EVENT_70E", c_uint8, 1), + ("EVENT_70F", c_uint8, 1), + ("EVENT_710", c_uint8, 1), + ("EVENT_711", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_4F_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_4F_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_4F_TRAINER_2", c_uint8, 1), + ("EVENT_715", c_uint8, 1), + ("EVENT_716", c_uint8, 1), + ("EVENT_717", c_uint8, 1), + ("EVENT_SILPH_CO_4_UNLOCKED_DOOR1", c_uint8, 1), + ("EVENT_SILPH_CO_4_UNLOCKED_DOOR2", c_uint8, 1), + ("EVENT_71A", c_uint8, 1), + ("EVENT_71B", c_uint8, 1), + ("EVENT_71C", c_uint8, 1), + ("EVENT_71D", c_uint8, 1), + ("EVENT_71E", c_uint8, 1), + ("EVENT_71F", c_uint8, 1), + ("EVENT_720", c_uint8, 1), + ("EVENT_721", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_5F_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_5F_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_5F_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_5F_TRAINER_3", c_uint8, 1), + ("EVENT_726", c_uint8, 1), + ("EVENT_727", c_uint8, 1), + ("EVENT_SILPH_CO_5_UNLOCKED_DOOR1", c_uint8, 1), + ("EVENT_SILPH_CO_5_UNLOCKED_DOOR2", c_uint8, 1), + ("EVENT_SILPH_CO_5_UNLOCKED_DOOR3", c_uint8, 1), + ("EVENT_72B", c_uint8, 1), + ("EVENT_72C", c_uint8, 1), + ("EVENT_72D", c_uint8, 1), + ("EVENT_72E", c_uint8, 1), + ("EVENT_72F", c_uint8, 1), + ("EVENT_730", c_uint8, 1), + ("EVENT_731", c_uint8, 1), + ("EVENT_732", c_uint8, 1), + ("EVENT_733", c_uint8, 1), + ("EVENT_734", c_uint8, 1), + ("EVENT_735", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_6F_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_6F_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_6F_TRAINER_2", c_uint8, 1), + ("EVENT_739", c_uint8, 1), + ("EVENT_73A", c_uint8, 1), + ("EVENT_73B", c_uint8, 1), + ("EVENT_73C", c_uint8, 1), + ("EVENT_73D", c_uint8, 1), + ("EVENT_73E", c_uint8, 1), + ("EVENT_SILPH_CO_6_UNLOCKED_DOOR", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_RIVAL", c_uint8, 1), + ("EVENT_741", c_uint8, 1), + ("EVENT_742", c_uint8, 1), + ("EVENT_743", c_uint8, 1), + ("EVENT_744", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_7F_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_7F_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_7F_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_7F_TRAINER_3", c_uint8, 1), + ("EVENT_749", c_uint8, 1), + ("EVENT_74A", c_uint8, 1), + ("EVENT_74B", c_uint8, 1), + ("EVENT_SILPH_CO_7_UNLOCKED_DOOR1", c_uint8, 1), + ("EVENT_SILPH_CO_7_UNLOCKED_DOOR2", c_uint8, 1), + ("EVENT_SILPH_CO_7_UNLOCKED_DOOR3", c_uint8, 1), + ("EVENT_74F", c_uint8, 1), + ("EVENT_750", c_uint8, 1), + ("EVENT_751", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_8F_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_8F_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_8F_TRAINER_2", c_uint8, 1), + ("EVENT_755", c_uint8, 1), + ("EVENT_756", c_uint8, 1), + ("EVENT_757", c_uint8, 1), + ("EVENT_SILPH_CO_8_UNLOCKED_DOOR", c_uint8, 1), + ("EVENT_759", c_uint8, 1), + ("EVENT_75A", c_uint8, 1), + ("EVENT_75B", c_uint8, 1), + ("EVENT_75C", c_uint8, 1), + ("EVENT_75D", c_uint8, 1), + ("EVENT_75E", c_uint8, 1), + ("EVENT_75F", c_uint8, 1), + ("EVENT_760", c_uint8, 1), + ("EVENT_761", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_9F_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_9F_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_9F_TRAINER_2", c_uint8, 1), + ("EVENT_765", c_uint8, 1), + ("EVENT_766", c_uint8, 1), + ("EVENT_767", c_uint8, 1), + ("EVENT_SILPH_CO_9_UNLOCKED_DOOR1", c_uint8, 1), + ("EVENT_SILPH_CO_9_UNLOCKED_DOOR2", c_uint8, 1), + ("EVENT_SILPH_CO_9_UNLOCKED_DOOR3", c_uint8, 1), + ("EVENT_SILPH_CO_9_UNLOCKED_DOOR4", c_uint8, 1), + ("EVENT_76C", c_uint8, 1), + ("EVENT_76D", c_uint8, 1), + ("EVENT_76E", c_uint8, 1), + ("EVENT_76F", c_uint8, 1), + ("EVENT_770", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_10F_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_10F_TRAINER_1", c_uint8, 1), + ("EVENT_773", c_uint8, 1), + ("EVENT_774", c_uint8, 1), + ("EVENT_775", c_uint8, 1), + ("EVENT_776", c_uint8, 1), + ("EVENT_777", c_uint8, 1), + ("EVENT_SILPH_CO_10_UNLOCKED_DOOR", c_uint8, 1), + ("EVENT_779", c_uint8, 1), + ("EVENT_77A", c_uint8, 1), + ("EVENT_77B", c_uint8, 1), + ("EVENT_77C", c_uint8, 1), + ("EVENT_77D", c_uint8, 1), + ("EVENT_77E", c_uint8, 1), + ("EVENT_77F", c_uint8, 1), + ("EVENT_780", c_uint8, 1), + ("EVENT_781", c_uint8, 1), + ("EVENT_782", c_uint8, 1), + ("EVENT_783", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_11F_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_11F_TRAINER_1", c_uint8, 1), + ("EVENT_786", c_uint8, 1), + ("EVENT_787", c_uint8, 1), + ("EVENT_SILPH_CO_11_UNLOCKED_DOOR", c_uint8, 1), + ("EVENT_789", c_uint8, 1), + ("EVENT_78A", c_uint8, 1), + ("EVENT_78B", c_uint8, 1), + ("EVENT_78C", c_uint8, 1), + ("EVENT_GOT_MASTER_BALL", c_uint8, 1), + ("EVENT_78E", c_uint8, 1), + ("EVENT_BEAT_SILPH_CO_GIOVANNI", c_uint8, 1), + ("EVENT_790", c_uint8, 1), + ("EVENT_791", c_uint8, 1), + ("EVENT_792", c_uint8, 1), + ("EVENT_793", c_uint8, 1), + ("EVENT_794", c_uint8, 1), + ("EVENT_795", c_uint8, 1), + ("EVENT_796", c_uint8, 1), + ("EVENT_797", c_uint8, 1), + ("EVENT_798", c_uint8, 1), + ("EVENT_799", c_uint8, 1), + ("EVENT_79A", c_uint8, 1), + ("EVENT_79B", c_uint8, 1), + ("EVENT_79C", c_uint8, 1), + ("EVENT_79D", c_uint8, 1), + ("EVENT_79E", c_uint8, 1), + ("EVENT_79F", c_uint8, 1), + ("EVENT_7A0", c_uint8, 1), + ("EVENT_7A1", c_uint8, 1), + ("EVENT_7A2", c_uint8, 1), + ("EVENT_7A3", c_uint8, 1), + ("EVENT_7A4", c_uint8, 1), + ("EVENT_7A5", c_uint8, 1), + ("EVENT_7A6", c_uint8, 1), + ("EVENT_7A7", c_uint8, 1), + ("EVENT_7A8", c_uint8, 1), + ("EVENT_7A9", c_uint8, 1), + ("EVENT_7AA", c_uint8, 1), + ("EVENT_7AB", c_uint8, 1), + ("EVENT_7AC", c_uint8, 1), + ("EVENT_7AD", c_uint8, 1), + ("EVENT_7AE", c_uint8, 1), + ("EVENT_7AF", c_uint8, 1), + ("EVENT_7B0", c_uint8, 1), + ("EVENT_7B1", c_uint8, 1), + ("EVENT_7B2", c_uint8, 1), + ("EVENT_7B3", c_uint8, 1), + ("EVENT_7B4", c_uint8, 1), + ("EVENT_7B5", c_uint8, 1), + ("EVENT_7B6", c_uint8, 1), + ("EVENT_7B7", c_uint8, 1), + ("EVENT_7B8", c_uint8, 1), + ("EVENT_7B9", c_uint8, 1), + ("EVENT_7BA", c_uint8, 1), + ("EVENT_7BB", c_uint8, 1), + ("EVENT_7BC", c_uint8, 1), + ("EVENT_7BD", c_uint8, 1), + ("EVENT_7BE", c_uint8, 1), + ("EVENT_7BF", c_uint8, 1), + ("EVENT_7C0", c_uint8, 1), + ("EVENT_7C1", c_uint8, 1), + ("EVENT_7C2", c_uint8, 1), + ("EVENT_7C3", c_uint8, 1), + ("EVENT_7C4", c_uint8, 1), + ("EVENT_7C5", c_uint8, 1), + ("EVENT_7C6", c_uint8, 1), + ("EVENT_7C7", c_uint8, 1), + ("EVENT_7C8", c_uint8, 1), + ("EVENT_7C9", c_uint8, 1), + ("EVENT_7CA", c_uint8, 1), + ("EVENT_7CB", c_uint8, 1), + ("EVENT_7CC", c_uint8, 1), + ("EVENT_7CD", c_uint8, 1), + ("EVENT_7CE", c_uint8, 1), + ("EVENT_7CF", c_uint8, 1), + ("EVENT_7D0", c_uint8, 1), + ("EVENT_7D1", c_uint8, 1), + ("EVENT_7D2", c_uint8, 1), + ("EVENT_7D3", c_uint8, 1), + ("EVENT_7D4", c_uint8, 1), + ("EVENT_7D5", c_uint8, 1), + ("EVENT_7D6", c_uint8, 1), + ("EVENT_7D7", c_uint8, 1), + ("EVENT_7D8", c_uint8, 1), + ("EVENT_7D9", c_uint8, 1), + ("EVENT_7DA", c_uint8, 1), + ("EVENT_7DB", c_uint8, 1), + ("EVENT_7DC", c_uint8, 1), + ("EVENT_7DD", c_uint8, 1), + ("EVENT_7DE", c_uint8, 1), + ("EVENT_7DF", c_uint8, 1), + ("EVENT_7E0", c_uint8, 1), + ("EVENT_7E1", c_uint8, 1), + ("EVENT_7E2", c_uint8, 1), + ("EVENT_7E3", c_uint8, 1), + ("EVENT_7E4", c_uint8, 1), + ("EVENT_7E5", c_uint8, 1), + ("EVENT_7E6", c_uint8, 1), + ("EVENT_7E7", c_uint8, 1), + ("EVENT_7E8", c_uint8, 1), + ("EVENT_7E9", c_uint8, 1), + ("EVENT_7EA", c_uint8, 1), + ("EVENT_7EB", c_uint8, 1), + ("EVENT_7EC", c_uint8, 1), + ("EVENT_7ED", c_uint8, 1), + ("EVENT_7EE", c_uint8, 1), + ("EVENT_7EF", c_uint8, 1), + ("EVENT_7F0", c_uint8, 1), + ("EVENT_7F1", c_uint8, 1), + ("EVENT_7F2", c_uint8, 1), + ("EVENT_7F3", c_uint8, 1), + ("EVENT_7F4", c_uint8, 1), + ("EVENT_7F5", c_uint8, 1), + ("EVENT_7F6", c_uint8, 1), + ("EVENT_7F7", c_uint8, 1), + ("EVENT_7F8", c_uint8, 1), + ("EVENT_7F9", c_uint8, 1), + ("EVENT_7FA", c_uint8, 1), + ("EVENT_7FB", c_uint8, 1), + ("EVENT_7FC", c_uint8, 1), + ("EVENT_7FD", c_uint8, 1), + ("EVENT_7FE", c_uint8, 1), + ("EVENT_7FF", c_uint8, 1), + ("EVENT_800", c_uint8, 1), + ("EVENT_BEAT_MANSION_2_TRAINER_0", c_uint8, 1), + ("EVENT_802", c_uint8, 1), + ("EVENT_803", c_uint8, 1), + ("EVENT_804", c_uint8, 1), + ("EVENT_805", c_uint8, 1), + ("EVENT_806", c_uint8, 1), + ("EVENT_807", c_uint8, 1), + ("EVENT_808", c_uint8, 1), + ("EVENT_809", c_uint8, 1), + ("EVENT_80A", c_uint8, 1), + ("EVENT_80B", c_uint8, 1), + ("EVENT_80C", c_uint8, 1), + ("EVENT_80D", c_uint8, 1), + ("EVENT_80E", c_uint8, 1), + ("EVENT_80F", c_uint8, 1), + ("EVENT_810", c_uint8, 1), + ("EVENT_BEAT_MANSION_3_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_MANSION_3_TRAINER_1", c_uint8, 1), + ("EVENT_813", c_uint8, 1), + ("EVENT_814", c_uint8, 1), + ("EVENT_815", c_uint8, 1), + ("EVENT_816", c_uint8, 1), + ("EVENT_817", c_uint8, 1), + ("EVENT_818", c_uint8, 1), + ("EVENT_819", c_uint8, 1), + ("EVENT_81A", c_uint8, 1), + ("EVENT_81B", c_uint8, 1), + ("EVENT_81C", c_uint8, 1), + ("EVENT_81D", c_uint8, 1), + ("EVENT_81E", c_uint8, 1), + ("EVENT_81F", c_uint8, 1), + ("EVENT_820", c_uint8, 1), + ("EVENT_BEAT_MANSION_4_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_MANSION_4_TRAINER_1", c_uint8, 1), + ("EVENT_823", c_uint8, 1), + ("EVENT_824", c_uint8, 1), + ("EVENT_825", c_uint8, 1), + ("EVENT_826", c_uint8, 1), + ("EVENT_827", c_uint8, 1), + ("EVENT_828", c_uint8, 1), + ("EVENT_829", c_uint8, 1), + ("EVENT_82A", c_uint8, 1), + ("EVENT_82B", c_uint8, 1), + ("EVENT_82C", c_uint8, 1), + ("EVENT_82D", c_uint8, 1), + ("EVENT_82E", c_uint8, 1), + ("EVENT_82F", c_uint8, 1), + ("EVENT_830", c_uint8, 1), + ("EVENT_831", c_uint8, 1), + ("EVENT_832", c_uint8, 1), + ("EVENT_833", c_uint8, 1), + ("EVENT_834", c_uint8, 1), + ("EVENT_835", c_uint8, 1), + ("EVENT_836", c_uint8, 1), + ("EVENT_837", c_uint8, 1), + ("EVENT_838", c_uint8, 1), + ("EVENT_839", c_uint8, 1), + ("EVENT_83A", c_uint8, 1), + ("EVENT_83B", c_uint8, 1), + ("EVENT_83C", c_uint8, 1), + ("EVENT_83D", c_uint8, 1), + ("EVENT_83E", c_uint8, 1), + ("EVENT_83F", c_uint8, 1), + ("EVENT_840", c_uint8, 1), + ("EVENT_841", c_uint8, 1), + ("EVENT_842", c_uint8, 1), + ("EVENT_843", c_uint8, 1), + ("EVENT_844", c_uint8, 1), + ("EVENT_845", c_uint8, 1), + ("EVENT_846", c_uint8, 1), + ("EVENT_847", c_uint8, 1), + ("EVENT_848", c_uint8, 1), + ("EVENT_849", c_uint8, 1), + ("EVENT_84A", c_uint8, 1), + ("EVENT_84B", c_uint8, 1), + ("EVENT_84C", c_uint8, 1), + ("EVENT_84D", c_uint8, 1), + ("EVENT_84E", c_uint8, 1), + ("EVENT_84F", c_uint8, 1), + ("EVENT_850", c_uint8, 1), + ("EVENT_851", c_uint8, 1), + ("EVENT_852", c_uint8, 1), + ("EVENT_853", c_uint8, 1), + ("EVENT_854", c_uint8, 1), + ("EVENT_855", c_uint8, 1), + ("EVENT_856", c_uint8, 1), + ("EVENT_857", c_uint8, 1), + ("EVENT_858", c_uint8, 1), + ("EVENT_859", c_uint8, 1), + ("EVENT_85A", c_uint8, 1), + ("EVENT_85B", c_uint8, 1), + ("EVENT_85C", c_uint8, 1), + ("EVENT_85D", c_uint8, 1), + ("EVENT_85E", c_uint8, 1), + ("EVENT_85F", c_uint8, 1), + ("EVENT_860", c_uint8, 1), + ("EVENT_861", c_uint8, 1), + ("EVENT_862", c_uint8, 1), + ("EVENT_863", c_uint8, 1), + ("EVENT_864", c_uint8, 1), + ("EVENT_865", c_uint8, 1), + ("EVENT_866", c_uint8, 1), + ("EVENT_867", c_uint8, 1), + ("EVENT_868", c_uint8, 1), + ("EVENT_869", c_uint8, 1), + ("EVENT_86A", c_uint8, 1), + ("EVENT_86B", c_uint8, 1), + ("EVENT_86C", c_uint8, 1), + ("EVENT_86D", c_uint8, 1), + ("EVENT_86E", c_uint8, 1), + ("EVENT_86F", c_uint8, 1), + ("EVENT_870", c_uint8, 1), + ("EVENT_871", c_uint8, 1), + ("EVENT_872", c_uint8, 1), + ("EVENT_873", c_uint8, 1), + ("EVENT_874", c_uint8, 1), + ("EVENT_875", c_uint8, 1), + ("EVENT_876", c_uint8, 1), + ("EVENT_877", c_uint8, 1), + ("EVENT_878", c_uint8, 1), + ("EVENT_879", c_uint8, 1), + ("EVENT_87A", c_uint8, 1), + ("EVENT_87B", c_uint8, 1), + ("EVENT_87C", c_uint8, 1), + ("EVENT_87D", c_uint8, 1), + ("EVENT_87E", c_uint8, 1), + ("EVENT_87F", c_uint8, 1), + ("EVENT_GOT_HM03", c_uint8, 1), + ("EVENT_881", c_uint8, 1), + ("EVENT_882", c_uint8, 1), + ("EVENT_883", c_uint8, 1), + ("EVENT_884", c_uint8, 1), + ("EVENT_885", c_uint8, 1), + ("EVENT_886", c_uint8, 1), + ("EVENT_887", c_uint8, 1), + ("EVENT_888", c_uint8, 1), + ("EVENT_889", c_uint8, 1), + ("EVENT_88A", c_uint8, 1), + ("EVENT_88B", c_uint8, 1), + ("EVENT_88C", c_uint8, 1), + ("EVENT_88D", c_uint8, 1), + ("EVENT_88E", c_uint8, 1), + ("EVENT_88F", c_uint8, 1), + ("EVENT_890", c_uint8, 1), + ("EVENT_891", c_uint8, 1), + ("EVENT_892", c_uint8, 1), + ("EVENT_893", c_uint8, 1), + ("EVENT_894", c_uint8, 1), + ("EVENT_895", c_uint8, 1), + ("EVENT_896", c_uint8, 1), + ("EVENT_897", c_uint8, 1), + ("EVENT_898", c_uint8, 1), + ("EVENT_899", c_uint8, 1), + ("EVENT_89A", c_uint8, 1), + ("EVENT_89B", c_uint8, 1), + ("EVENT_89C", c_uint8, 1), + ("EVENT_89D", c_uint8, 1), + ("EVENT_89E", c_uint8, 1), + ("EVENT_89F", c_uint8, 1), + ("EVENT_8A0", c_uint8, 1), + ("EVENT_8A1", c_uint8, 1), + ("EVENT_8A2", c_uint8, 1), + ("EVENT_8A3", c_uint8, 1), + ("EVENT_8A4", c_uint8, 1), + ("EVENT_8A5", c_uint8, 1), + ("EVENT_8A6", c_uint8, 1), + ("EVENT_8A7", c_uint8, 1), + ("EVENT_8A8", c_uint8, 1), + ("EVENT_8A9", c_uint8, 1), + ("EVENT_8AA", c_uint8, 1), + ("EVENT_8AB", c_uint8, 1), + ("EVENT_8AC", c_uint8, 1), + ("EVENT_8AD", c_uint8, 1), + ("EVENT_8AE", c_uint8, 1), + ("EVENT_8AF", c_uint8, 1), + ("EVENT_8B0", c_uint8, 1), + ("EVENT_8B1", c_uint8, 1), + ("EVENT_8B2", c_uint8, 1), + ("EVENT_8B3", c_uint8, 1), + ("EVENT_8B4", c_uint8, 1), + ("EVENT_8B5", c_uint8, 1), + ("EVENT_8B6", c_uint8, 1), + ("EVENT_8B7", c_uint8, 1), + ("EVENT_8B8", c_uint8, 1), + ("EVENT_8B9", c_uint8, 1), + ("EVENT_8BA", c_uint8, 1), + ("EVENT_8BB", c_uint8, 1), + ("EVENT_8BC", c_uint8, 1), + ("EVENT_8BD", c_uint8, 1), + ("EVENT_8BE", c_uint8, 1), + ("EVENT_8BF", c_uint8, 1), + ("EVENT_8C0", c_uint8, 1), + ("EVENT_BEAT_MEWTWO", c_uint8, 1), + ("EVENT_8C2", c_uint8, 1), + ("EVENT_8C3", c_uint8, 1), + ("EVENT_8C4", c_uint8, 1), + ("EVENT_8C5", c_uint8, 1), + ("EVENT_8C6", c_uint8, 1), + ("EVENT_8C7", c_uint8, 1), + ("EVENT_8C8", c_uint8, 1), + ("EVENT_8C9", c_uint8, 1), + ("EVENT_8CA", c_uint8, 1), + ("EVENT_8CB", c_uint8, 1), + ("EVENT_8CC", c_uint8, 1), + ("EVENT_8CD", c_uint8, 1), + ("EVENT_8CE", c_uint8, 1), + ("EVENT_8CF", c_uint8, 1), + ("EVENT_8D0", c_uint8, 1), + ("EVENT_8D1", c_uint8, 1), + ("EVENT_8D2", c_uint8, 1), + ("EVENT_8D3", c_uint8, 1), + ("EVENT_8D4", c_uint8, 1), + ("EVENT_8D5", c_uint8, 1), + ("EVENT_8D6", c_uint8, 1), + ("EVENT_8D7", c_uint8, 1), + ("EVENT_8D8", c_uint8, 1), + ("EVENT_8D9", c_uint8, 1), + ("EVENT_8DA", c_uint8, 1), + ("EVENT_8DB", c_uint8, 1), + ("EVENT_8DC", c_uint8, 1), + ("EVENT_8DD", c_uint8, 1), + ("EVENT_8DE", c_uint8, 1), + ("EVENT_8DF", c_uint8, 1), + ("ELITE4_EVENTS_START", c_uint8, 1), + ("EVENT_BEAT_LORELEIS_ROOM_TRAINER_0", c_uint8, 1), + ("EVENT_8E2", c_uint8, 1), + ("EVENT_8E3", c_uint8, 1), + ("EVENT_8E4", c_uint8, 1), + ("EVENT_8E5", c_uint8, 1), + ("EVENT_AUTOWALKED_INTO_LORELEIS_ROOM", c_uint8, 1), + ("EVENT_8E7", c_uint8, 1), + ("EVENT_8E8", c_uint8, 1), + ("EVENT_BEAT_BRUNOS_ROOM_TRAINER_0", c_uint8, 1), + ("EVENT_8EA", c_uint8, 1), + ("EVENT_8EB", c_uint8, 1), + ("EVENT_8EC", c_uint8, 1), + ("EVENT_8ED", c_uint8, 1), + ("EVENT_AUTOWALKED_INTO_BRUNOS_ROOM", c_uint8, 1), + ("EVENT_8EF", c_uint8, 1), + ("EVENT_8F0", c_uint8, 1), + ("EVENT_BEAT_AGATHAS_ROOM_TRAINER_0", c_uint8, 1), + ("EVENT_8F2", c_uint8, 1), + ("EVENT_8F3", c_uint8, 1), + ("EVENT_8F4", c_uint8, 1), + ("EVENT_8F5", c_uint8, 1), + ("EVENT_AUTOWALKED_INTO_AGATHAS_ROOM", c_uint8, 1), + ("EVENT_8F7", c_uint8, 1), + ("EVENT_8F8", c_uint8, 1), + ("EVENT_BEAT_LANCES_ROOM_TRAINER_0", c_uint8, 1), + ("EVENT_8FA", c_uint8, 1), + ("EVENT_8FB", c_uint8, 1), + ("EVENT_8FC", c_uint8, 1), + ("EVENT_8FD", c_uint8, 1), + ("EVENT_BEAT_LANCE", c_uint8, 1), + ("EVENT_LANCES_ROOM_LOCK_DOOR", c_uint8, 1), + ("EVENT_900", c_uint8, 1), + ("EVENT_BEAT_CHAMPION_RIVAL", c_uint8, 1), + ("EVENT_902", c_uint8, 1), + ("EVENT_903", c_uint8, 1), + ("EVENT_904", c_uint8, 1), + ("EVENT_905", c_uint8, 1), + ("EVENT_906", c_uint8, 1), + ("ELITE4_CHAMPION_EVENTS_END", c_uint8, 1), + ("EVENT_908", c_uint8, 1), + ("EVENT_909", c_uint8, 1), + ("EVENT_90A", c_uint8, 1), + ("EVENT_90B", c_uint8, 1), + ("EVENT_90C", c_uint8, 1), + ("EVENT_90D", c_uint8, 1), + ("EVENT_90E", c_uint8, 1), + ("EVENT_90F", c_uint8, 1), + ("EVENT_910", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1", c_uint8, 1), + ("EVENT_913", c_uint8, 1), + ("EVENT_914", c_uint8, 1), + ("EVENT_915", c_uint8, 1), + ("EVENT_916", c_uint8, 1), + ("EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH", c_uint8, 1), + ("EVENT_918", c_uint8, 1), + ("EVENT_919", c_uint8, 1), + ("EVENT_91A", c_uint8, 1), + ("EVENT_91B", c_uint8, 1), + ("EVENT_91C", c_uint8, 1), + ("EVENT_91D", c_uint8, 1), + ("EVENT_91E", c_uint8, 1), + ("EVENT_91F", c_uint8, 1), + ("EVENT_920", c_uint8, 1), + ("EVENT_921", c_uint8, 1), + ("EVENT_922", c_uint8, 1), + ("EVENT_923", c_uint8, 1), + ("EVENT_924", c_uint8, 1), + ("EVENT_925", c_uint8, 1), + ("EVENT_926", c_uint8, 1), + ("EVENT_927", c_uint8, 1), + ("EVENT_928", c_uint8, 1), + ("EVENT_929", c_uint8, 1), + ("EVENT_92A", c_uint8, 1), + ("EVENT_92B", c_uint8, 1), + ("EVENT_92C", c_uint8, 1), + ("EVENT_92D", c_uint8, 1), + ("EVENT_92E", c_uint8, 1), + ("EVENT_92F", c_uint8, 1), + ("EVENT_930", c_uint8, 1), + ("EVENT_931", c_uint8, 1), + ("EVENT_932", c_uint8, 1), + ("EVENT_933", c_uint8, 1), + ("EVENT_934", c_uint8, 1), + ("EVENT_935", c_uint8, 1), + ("EVENT_936", c_uint8, 1), + ("EVENT_937", c_uint8, 1), + ("EVENT_938", c_uint8, 1), + ("EVENT_939", c_uint8, 1), + ("EVENT_93A", c_uint8, 1), + ("EVENT_93B", c_uint8, 1), + ("EVENT_93C", c_uint8, 1), + ("EVENT_93D", c_uint8, 1), + ("EVENT_93E", c_uint8, 1), + ("EVENT_93F", c_uint8, 1), + ("EVENT_940", c_uint8, 1), + ("EVENT_941", c_uint8, 1), + ("EVENT_942", c_uint8, 1), + ("EVENT_943", c_uint8, 1), + ("EVENT_944", c_uint8, 1), + ("EVENT_945", c_uint8, 1), + ("EVENT_946", c_uint8, 1), + ("EVENT_947", c_uint8, 1), + ("EVENT_948", c_uint8, 1), + ("EVENT_949", c_uint8, 1), + ("EVENT_94A", c_uint8, 1), + ("EVENT_94B", c_uint8, 1), + ("EVENT_94C", c_uint8, 1), + ("EVENT_94D", c_uint8, 1), + ("EVENT_94E", c_uint8, 1), + ("EVENT_94F", c_uint8, 1), + ("EVENT_950", c_uint8, 1), + ("EVENT_951", c_uint8, 1), + ("EVENT_952", c_uint8, 1), + ("EVENT_953", c_uint8, 1), + ("EVENT_954", c_uint8, 1), + ("EVENT_955", c_uint8, 1), + ("EVENT_956", c_uint8, 1), + ("EVENT_957", c_uint8, 1), + ("EVENT_958", c_uint8, 1), + ("EVENT_959", c_uint8, 1), + ("EVENT_95A", c_uint8, 1), + ("EVENT_95B", c_uint8, 1), + ("EVENT_95C", c_uint8, 1), + ("EVENT_95D", c_uint8, 1), + ("EVENT_95E", c_uint8, 1), + ("EVENT_95F", c_uint8, 1), + ("EVENT_960", c_uint8, 1), + ("EVENT_961", c_uint8, 1), + ("EVENT_962", c_uint8, 1), + ("EVENT_963", c_uint8, 1), + ("EVENT_964", c_uint8, 1), + ("EVENT_965", c_uint8, 1), + ("EVENT_966", c_uint8, 1), + ("EVENT_967", c_uint8, 1), + ("EVENT_968", c_uint8, 1), + ("EVENT_969", c_uint8, 1), + ("EVENT_96A", c_uint8, 1), + ("EVENT_96B", c_uint8, 1), + ("EVENT_96C", c_uint8, 1), + ("EVENT_96D", c_uint8, 1), + ("EVENT_96E", c_uint8, 1), + ("EVENT_96F", c_uint8, 1), + ("EVENT_970", c_uint8, 1), + ("EVENT_971", c_uint8, 1), + ("EVENT_972", c_uint8, 1), + ("EVENT_973", c_uint8, 1), + ("EVENT_974", c_uint8, 1), + ("EVENT_975", c_uint8, 1), + ("EVENT_976", c_uint8, 1), + ("EVENT_977", c_uint8, 1), + ("EVENT_978", c_uint8, 1), + ("EVENT_979", c_uint8, 1), + ("EVENT_97A", c_uint8, 1), + ("EVENT_97B", c_uint8, 1), + ("EVENT_97C", c_uint8, 1), + ("EVENT_97D", c_uint8, 1), + ("EVENT_97E", c_uint8, 1), + ("EVENT_97F", c_uint8, 1), + ("EVENT_980", c_uint8, 1), + ("EVENT_981", c_uint8, 1), + ("EVENT_982", c_uint8, 1), + ("EVENT_983", c_uint8, 1), + ("EVENT_984", c_uint8, 1), + ("EVENT_985", c_uint8, 1), + ("EVENT_986", c_uint8, 1), + ("EVENT_987", c_uint8, 1), + ("EVENT_988", c_uint8, 1), + ("EVENT_989", c_uint8, 1), + ("EVENT_98A", c_uint8, 1), + ("EVENT_98B", c_uint8, 1), + ("EVENT_98C", c_uint8, 1), + ("EVENT_98D", c_uint8, 1), + ("EVENT_98E", c_uint8, 1), + ("EVENT_98F", c_uint8, 1), + ("EVENT_990", c_uint8, 1), + ("EVENT_991", c_uint8, 1), + ("EVENT_992", c_uint8, 1), + ("EVENT_993", c_uint8, 1), + ("EVENT_994", c_uint8, 1), + ("EVENT_995", c_uint8, 1), + ("EVENT_996", c_uint8, 1), + ("EVENT_997", c_uint8, 1), + ("EVENT_998", c_uint8, 1), + ("EVENT_999", c_uint8, 1), + ("EVENT_99A", c_uint8, 1), + ("EVENT_99B", c_uint8, 1), + ("EVENT_99C", c_uint8, 1), + ("EVENT_99D", c_uint8, 1), + ("EVENT_99E", c_uint8, 1), + ("EVENT_99F", c_uint8, 1), + ("EVENT_9A0", c_uint8, 1), + ("EVENT_9A1", c_uint8, 1), + ("EVENT_9A2", c_uint8, 1), + ("EVENT_9A3", c_uint8, 1), + ("EVENT_9A4", c_uint8, 1), + ("EVENT_9A5", c_uint8, 1), + ("EVENT_9A6", c_uint8, 1), + ("EVENT_9A7", c_uint8, 1), + ("EVENT_9A8", c_uint8, 1), + ("EVENT_9A9", c_uint8, 1), + ("EVENT_9AA", c_uint8, 1), + ("EVENT_9AB", c_uint8, 1), + ("EVENT_9AC", c_uint8, 1), + ("EVENT_9AD", c_uint8, 1), + ("EVENT_9AE", c_uint8, 1), + ("EVENT_9AF", c_uint8, 1), + ("EVENT_9B0", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6", c_uint8, 1), + ("EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7", c_uint8, 1), + ("EVENT_9B9", c_uint8, 1), + ("EVENT_9BA", c_uint8, 1), + ("EVENT_9BB", c_uint8, 1), + ("EVENT_9BC", c_uint8, 1), + ("EVENT_9BD", c_uint8, 1), + ("EVENT_9BE", c_uint8, 1), + ("EVENT_9BF", c_uint8, 1), + ("EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE", c_uint8, 1), + ("EVENT_SEAFOAM2_BOULDER2_DOWN_HOLE", c_uint8, 1), + ("EVENT_9C2", c_uint8, 1), + ("EVENT_9C3", c_uint8, 1), + ("EVENT_9C4", c_uint8, 1), + ("EVENT_9C5", c_uint8, 1), + ("EVENT_9C6", c_uint8, 1), + ("EVENT_9C7", c_uint8, 1), + ("EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE", c_uint8, 1), + ("EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE", c_uint8, 1), + ("EVENT_9CA", c_uint8, 1), + ("EVENT_9CB", c_uint8, 1), + ("EVENT_9CC", c_uint8, 1), + ("EVENT_9CD", c_uint8, 1), + ("EVENT_9CE", c_uint8, 1), + ("EVENT_9CF", c_uint8, 1), + ("EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE", c_uint8, 1), + ("EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE", c_uint8, 1), + ("EVENT_9D2", c_uint8, 1), + ("EVENT_9D3", c_uint8, 1), + ("EVENT_9D4", c_uint8, 1), + ("EVENT_9D5", c_uint8, 1), + ("EVENT_9D6", c_uint8, 1), + ("EVENT_9D7", c_uint8, 1), + ("EVENT_9D8", c_uint8, 1), + ("EVENT_9D9", c_uint8, 1), + ("EVENT_BEAT_ARTICUNO", c_uint8, 1), + ("EVENT_9DB", c_uint8, 1), + ("EVENT_9DC", c_uint8, 1), + ("EVENT_9DD", c_uint8, 1), + ("EVENT_9DE", c_uint8, 1), + ("EVENT_9DF", c_uint8, 1), + ("EVENT_9E0", c_uint8, 1), + ("EVENT_9E1", c_uint8, 1), + ("EVENT_9E2", c_uint8, 1), + ("EVENT_9E3", c_uint8, 1), + ("EVENT_9E4", c_uint8, 1), + ("EVENT_9E5", c_uint8, 1), + ("EVENT_9E6", c_uint8, 1), + ("EVENT_9E7", c_uint8, 1), + ("EVENT_9E8", c_uint8, 1), + ("EVENT_9E9", c_uint8, 1), + ("EVENT_9EA", c_uint8, 1), + ("EVENT_9EB", c_uint8, 1), + ("EVENT_9EC", c_uint8, 1), + ("EVENT_9ED", c_uint8, 1), + ("EVENT_9EE", c_uint8, 1), + ("EVENT_9EF", c_uint8, 1), + ("EVENT_9F0", c_uint8, 1), + ("EVENT_9F1", c_uint8, 1), + ("EVENT_9F2", c_uint8, 1), + ("EVENT_9F3", c_uint8, 1), + ("EVENT_9F4", c_uint8, 1), + ("EVENT_9F5", c_uint8, 1), + ("EVENT_9F6", c_uint8, 1), + ("EVENT_9F7", c_uint8, 1), + ("EVENT_9F8", c_uint8, 1), + ("EVENT_9F9", c_uint8, 1), + ("EVENT_9FA", c_uint8, 1), + ("EVENT_9FB", c_uint8, 1), + ("EVENT_9FC", c_uint8, 1), + ("EVENT_9FD", c_uint8, 1), + ("EVENT_9FE", c_uint8, 1), + ("EVENT_9FF", c_uint8, 1), + ] + + +class EventFlags(Union): + _fields_ = [("b", Flags_bits), ("asbytes", c_uint8 * 320)] + + def __init__(self, emu: PyBoy): + super().__init__() + self.asbytes = (c_uint8 * 320)( + *emu.memory[EVENT_FLAGS_START : EVENT_FLAGS_START + EVENTS_FLAGS_LENGTH] + ) + + def get_event(self, event_name: str) -> bool: + return bool(getattr(self.b, event_name)) diff --git a/pokemonred_puffer/environment.py b/pokemonred_puffer/environment.py index 016cef0..870614e 100644 --- a/pokemonred_puffer/environment.py +++ b/pokemonred_puffer/environment.py @@ -16,7 +16,12 @@ # from skimage.transform import resize import pufferlib -from pokemonred_puffer.data.events import EVENT_FLAGS_START, EVENTS_FLAGS_LENGTH, MUSEUM_TICKET +from pokemonred_puffer.data.events import ( + EVENT_FLAGS_START, + EVENTS_FLAGS_LENGTH, + MUSEUM_TICKET, + EventFlags, +) from pokemonred_puffer.data.field_moves import FieldMoves from pokemonred_puffer.data.items import ( HM_ITEM_IDS, @@ -280,6 +285,7 @@ def reset(self, seed: Optional[int] = None, options: Optional[dict[str, Any]] = self.cut_explore_map *= 0 self.reset_mem() + self.events = EventFlags(self.pyboy) self.update_pokedex() self.update_tm_hm_moves_obtained() self.taught_cut = self.check_if_party_has_hm(0xF) @@ -496,7 +502,7 @@ def _get_obs(self): ), "blackout_map_id": np.array(self.read_m("wLastBlackoutMap"), dtype=np.uint8), "battle_type": np.array(self.read_m("wIsInBattle") + 1, dtype=np.uint8), - "cut_event": np.array(self.read_bit(0xD803, 0), dtype=np.uint8), + "cut_event": np.array(self.events.get_event("EVENT_GOT_HM01"), dtype=np.uint8), "cut_in_party": np.array(self.check_if_party_has_hm(0xF), dtype=np.uint8), # "x": np.array(player_x, dtype=np.uint8), # "y": np.array(player_y, dtype=np.uint8), @@ -541,6 +547,7 @@ def step(self, action): self.pyboy.memory[wPlayerMoney : wPlayerMoney + 3] = int(10000).to_bytes(3, "little") self.run_action_on_emulator(action) + self.events = EventFlags(self.pyboy) self.update_seen_coords() self.update_health() self.update_pokedex() @@ -592,26 +599,26 @@ def run_action_on_emulator(self, action): self.pyboy.send_input(VALID_RELEASE_ACTIONS[action], delay=8) self.pyboy.tick(self.action_freq, render=True) - if self.read_bit(0xD803, 0): + if self.events.get_event("EVENT_GOT_HM01"): if self.auto_teach_cut and not self.check_if_party_has_hm(0x0F): self.teach_hm(TmHmMoves.CUT.value, 30, CUT_SPECIES_IDS) if self.auto_use_cut: self.cut_if_next() - if self.read_bit(0xD78E, 0): + if self.events.get_event("EVENT_GOT_HM03"): if self.auto_teach_surf and not self.check_if_party_has_hm(0x39): self.teach_hm(TmHmMoves.SURF.value, 15, SURF_SPECIES_IDS) if self.auto_use_surf: self.surf_if_attempt(VALID_ACTIONS[action]) - if self.read_bit(0xD857, 0): + if self.events.get_event("EVENT_GOT_HM04"): if self.auto_teach_strength and not self.check_if_party_has_hm(0x46): self.teach_hm(TmHmMoves.STRENGTH.value, 15, STRENGTH_SPECIES_IDS) if self.auto_solve_strength_puzzles: self.solve_missable_strength_puzzle() self.solve_switch_strength_puzzle() - if self.read_bit(0xD76C, 0) and self.auto_pokeflute: + if self.events.get_event("EVENT_GOT_POKE_FLUTE") and self.auto_pokeflute: self.use_pokeflute() def party_has_cut_capable_mon(self): @@ -1088,14 +1095,20 @@ def agent_stats(self, action): "seen_pokemon": int(sum(self.seen_pokemon)), "moves_obtained": int(sum(self.moves_obtained)), "opponent_level": self.max_opponent_level, - "met_bill": int(self.read_bit(0xD7F1, 0)), - "used_cell_separator_on_bill": int(self.read_bit(0xD7F2, 3)), - "ss_ticket": int(self.read_bit(0xD7F2, 4)), - "met_bill_2": int(self.read_bit(0xD7F2, 5)), - "bill_said_use_cell_separator": int(self.read_bit(0xD7F2, 6)), - "left_bills_house_after_helping": int(self.read_bit(0xD7F2, 7)), - "got_hm01": int(self.read_bit(0xD803, 0)), - "rubbed_captains_back": int(self.read_bit(0xD803, 1)), + "met_bill": int(self.events.get_event("EVENT_MET_BILL")), + "used_cell_separator_on_bill": int( + self.events.get_event("EVENT_USED_CELL_SEPARATOR_ON_BILL") + ), + "ss_ticket": int(self.events.get_event("EVENT_GOT_SS_TICKET")), + "met_bill_2": int(self.events.get_event("EVENT_MET_BILL_2")), + "bill_said_use_cell_separator": int( + self.events.get_event("EVENT_BILL_SAID_USE_CELL_SEPARATOR") + ), + "left_bills_house_after_helping": int( + self.events.get_event("EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING") + ), + "got_hm01": int(self.events.get_event("EVENT_GOT_HM01")), + "rubbed_captains_back": int(self.events.get_event("EVENT_RUBBED_CAPTAINS_BACK")), "taught_cut": int(self.check_if_party_has_hm(0xF)), "cut_coords": sum(self.cut_coords.values()), "cut_tiles": len(self.cut_tiles), @@ -1110,7 +1123,7 @@ def agent_stats(self, action): "blackout_count": self.blackout_count, "pokecenter": np.sum(self.pokecenters), "rival3": int(self.read_m(0xD665) == 4), - "rocket_hideout_found": int(self.read_bit(0xD77E, 1)), + "rocket_hideout_found": self.events.get_event("EVENT_FOUND_ROCKET_HIDEOUT"), } | {f"badge_{i+1}": bool(badges & (1 << i)) for i in range(8)}, "reward": self.get_game_state_reward(), diff --git a/pokemonred_puffer/rewards/baseline.py b/pokemonred_puffer/rewards/baseline.py index 4f8497a..fe93469 100644 --- a/pokemonred_puffer/rewards/baseline.py +++ b/pokemonred_puffer/rewards/baseline.py @@ -35,21 +35,24 @@ def get_game_state_reward(self): "taught_cut": 4 * int(self.check_if_party_has_hm(0xF)), "cut_coords": sum(self.cut_coords.values()) * 1.0, "cut_tiles": sum(self.cut_tiles.values()) * 1.0, - "met_bill": 5 * int(self.read_bit(0xD7F1, 0)), - "used_cell_separator_on_bill": 5 * int(self.read_bit(0xD7F2, 3)), - "ss_ticket": 5 * int(self.read_bit(0xD7F2, 4)), - "met_bill_2": 5 * int(self.read_bit(0xD7F2, 5)), - "bill_said_use_cell_separator": 5 * int(self.read_bit(0xD7F2, 6)), - "left_bills_house_after_helping": 5 * int(self.read_bit(0xD7F2, 7)), - "got_hm01": 5 * int(self.read_bit(0xD803, 0)), - "rubbed_captains_back": 5 * int(self.read_bit(0xD803, 1)), + "met_bill": 5 * int(self.events.get_event("EVENT_MET_BILL")), + "used_cell_separator_on_bill": 5 + * int(self.events.get_event("EVENT_USED_CELL_SEPARATOR_ON_BILL")), + "ss_ticket": 5 * int(self.events.get_event("EVENT_GOT_SS_TICKET")), + "met_bill_2": 5 * int(self.events.get_event("EVENT_MET_BILL_2")), + "bill_said_use_cell_separator": 5 + * int(self.events.get_event("EVENT_BILL_SAID_USE_CELL_SEPARATOR")), + "left_bills_house_after_helping": 5 + * int(self.events.get_event("EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING")), + "got_hm01": 5 * int(self.events.get_event("EVENT_GOT_HM01")), + "rubbed_captains_back": 5 * int(self.events.get_event("EVENT_RUBBED_CAPTAINS_BACK")), "start_menu": self.seen_start_menu * 0.01, "pokemon_menu": self.seen_pokemon_menu * 0.1, "stats_menu": self.seen_stats_menu * 0.1, "bag_menu": self.seen_bag_menu * 0.1, "action_bag_menu": self.seen_action_bag_menu * 0.1, # "blackout_check": self.blackout_check * 0.001, - "rival3": self.reward_config["event"] * int(self.read_m(0xD665) == 4), + "rival3": self.reward_config["event"] * int(self.read_m("wSSAnne2FCurScript") == 4), } def update_max_event_rew(self): @@ -85,15 +88,18 @@ class TeachCutReplicationEnv(BaselineRewardEnv): def get_game_state_reward(self): return { "event": self.reward_config["event"] * self.update_max_event_rew(), - "met_bill": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F1, 0)), + "met_bill": self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_MET_BILL")), "used_cell_separator_on_bill": self.reward_config["bill_saved"] - * int(self.read_bit(0xD7F2, 3)), - "ss_ticket": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 4)), - "met_bill_2": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 5)), + * int(self.events.get_event("EVENT_USED_CELL_SEPARATOR_ON_BILL")), + "ss_ticket": self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_GOT_SS_TICKET")), + "met_bill_2": self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_MET_BILL_2")), "bill_said_use_cell_separator": self.reward_config["bill_saved"] - * int(self.read_bit(0xD7F2, 6)), + * int(self.events.get_event("EVENT_BILL_SAID_USE_CELL_SEPARATOR")), "left_bills_house_after_helping": self.reward_config["bill_saved"] - * int(self.read_bit(0xD7F2, 7)), + * int(self.events.get_event("EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING")), "seen_pokemon": self.reward_config["seen_pokemon"] * sum(self.seen_pokemon), "caught_pokemon": self.reward_config["caught_pokemon"] * sum(self.caught_pokemon), "moves_obtained": self.reward_config["moves_obtained"] * sum(self.moves_obtained), @@ -107,7 +113,7 @@ def get_game_state_reward(self): "pokemon_menu": self.reward_config["pokemon_menu"] * self.seen_pokemon_menu, "stats_menu": self.reward_config["stats_menu"] * self.seen_stats_menu, "bag_menu": self.reward_config["bag_menu"] * self.seen_bag_menu, - "rival3": self.reward_config["event"] * int(self.read_m(0xD665) == 4), + "rival3": self.reward_config["event"] * int(self.read_m("wSSAnne2FCurScript") == 4), } @@ -115,17 +121,23 @@ class TeachCutReplicationEnvFork(BaselineRewardEnv): def get_game_state_reward(self): return { "event": self.reward_config["event"] * self.update_max_event_rew(), - "met_bill": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F1, 0)), + "met_bill": self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_MET_BILL")), "used_cell_separator_on_bill": ( - self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 3)) + self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_USED_CELL_SEPARATOR_ON_BILL")) ), - "ss_ticket": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 4)), - "met_bill_2": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 5)), + "ss_ticket": self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_USED_CELL_SEPARATOR_ON_BILL")), + "met_bill_2": self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_MET_BILL_2")), "bill_said_use_cell_separator": ( - self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 6)) + self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_BILL_SAID_USE_CELL_SEPARATOR")) ), "left_bills_house_after_helping": ( - self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 7)) + self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING")) ), "moves_obtained": self.reward_config["moves_obtained"] * sum(self.moves_obtained), "hm_count": self.reward_config["hm_count"] * self.get_hm_count(), @@ -167,15 +179,18 @@ class CutWithObjectRewardsEnv(BaselineRewardEnv): def get_game_state_reward(self): return { "event": self.reward_config["event"] * self.update_max_event_rew(), - "met_bill": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F1, 0)), + "met_bill": self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_MET_BILL")), "used_cell_separator_on_bill": self.reward_config["bill_saved"] - * int(self.read_bit(0xD7F2, 3)), - "ss_ticket": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 4)), - "met_bill_2": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 5)), + * int(self.events.get_event("EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING")), + "ss_ticket": self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_GOT_SS_TICKET")), + "met_bill_2": self.reward_config["bill_saved"] + * int(self.events.get_event("EVENT_MET_BILL_2")), "bill_said_use_cell_separator": self.reward_config["bill_saved"] - * int(self.read_bit(0xD7F2, 6)), + * int(self.events.get_event("EVENT_BILL_SAID_USE_CELL_SEPARATOR")), "left_bills_house_after_helping": self.reward_config["bill_saved"] - * int(self.read_bit(0xD7F2, 7)), + * int(self.events.get_event("EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING")), "seen_pokemon": self.reward_config["seen_pokemon"] * sum(self.seen_pokemon), "caught_pokemon": self.reward_config["caught_pokemon"] * sum(self.caught_pokemon), "moves_obtained": self.reward_config["moves_obtained"] * sum(self.moves_obtained), @@ -189,9 +204,9 @@ def get_game_state_reward(self): "pokemon_menu": self.reward_config["pokemon_menu"] * self.seen_pokemon_menu, "stats_menu": self.reward_config["stats_menu"] * self.seen_stats_menu, "bag_menu": self.reward_config["bag_menu"] * self.seen_bag_menu, - "rival3": self.reward_config["event"] * int(self.read_m(0xD665) == 4), + "rival3": self.reward_config["event"] * int(self.read_m("wSSAnne2FCurScript") == 4), "rocket_hideout_found": self.reward_config["rocket_hideout_found"] - * int(self.read_bit(0xD77E, 1)), + * int(self.events.get_event("EVENT_FOUND_ROCKET_HIDEOUT")), "explore_hidden_objs": sum(self.seen_hidden_objs.values()) * self.reward_config["explore_hidden_objs"], "seen_action_bag_menu": self.seen_action_bag_menu